-
1. Re: How would you redirect from secure domain following CLEAR CART option
Greg.Tomkins Aug 20, 2014 1:56 AM (in response to Greg.Tomkins)Am I missing something blazingly obvious? I would have thought this was a common issue... does anyone have a solution for me please.
-
2. Re: How would you redirect from secure domain following CLEAR CART option
TheBCMan Aug 20, 2014 2:05 AM (in response to Greg.Tomkins)Could you hard code the view cart link to your full URL if you want to redirect back there?
-
3. Re: How would you redirect from secure domain following CLEAR CART option
Greg.Tomkins Aug 20, 2014 2:31 AM (in response to TheBCMan)The problem with that is that the module_shoppingcartsummary sets that link and there is no direct ability to change that. I am sure it will need some script but where to put that script is the question.
-
4. Re: How would you redirect from secure domain following CLEAR CART option
TheBCMan Aug 20, 2014 2:40 AM (in response to Greg.Tomkins)You can easily overwrite it in JS, what is the URL your page and I'll write something quick for you.
-
5. Re: How would you redirect from secure domain following CLEAR CART option
Greg.Tomkins Aug 20, 2014 3:03 AM (in response to TheBCMan)Thanks appreciate that - site url is http://www.redcliffecityclaytargetclub.com.au
I have been playing around by inserting the script into the the different pages that might need it which kind of works but this seems to be an overkill to put that script into every page and then I was wondering what if it was just inserted into the REGISTRATION BUY page as that would then change all links in that page back to std non-secure domain but unsure of repercussions so am keen to see your solution.
As I asked - what have other people ever done about this as I am even surprised that I had not thought of this issue long ago myself.
-
6. Re: How would you redirect from secure domain following CLEAR CART option
TheBCMan Aug 20, 2014 7:41 PM (in response to Greg.Tomkins)I took a look at the site, can you clarify the problem a little, I attempted to sign up, entered in my details, then entered in a invalid credit card and got to an error page, but there is no view cart button there. I don't really want to purchase a membership, is the page with view cart button that you were talking about on the completed page? I actually thought you were talking about a shopping cart? Am I looking in the wrong place?
-
7. Re: How would you redirect from secure domain following CLEAR CART option
Greg.Tomkins Aug 21, 2014 2:23 PM (in response to TheBCMan)I have responded by way of PM and when I discover the complete answer I will post it here. I have managed to resolve 99% of the issue by inserting the script placed into the receipt page. For those interested, the solution for that is re-posted here as I can't remember where the original post is.
BC will change to the secure domain https://....worldsecuresystems.com for processing all secure payments after which the user will be redirected (unless you change the form argments) to the default system receipt page.
To ensure all future pages viewed are on the correct domain rather than the secure domain insert the following script at the end of the Receipt page remembering to set the correct domain name in the var siteUrl
<script>
var siteUrl = 'http://yourdomain.com.au';
var links = document.getElementsByTagName('A');
for (i = 0; i < links.length; i++)
{
if (links[i].getAttribute('href'))
{
var href = links[i].getAttribute('href');
if (href.substring(0,4) != 'http' && href.substring(0,1) == '/')
{
//this example requires your links to have absolute paths.
//document-relative paths and absolute URLs are not supported.
links[i].setAttribute('href', siteUrl + href);
}
}
}
</script>
-
8. Re: How would you redirect from secure domain following CLEAR CART option
TheBCMan Aug 21, 2014 6:39 PM (in response to Greg.Tomkins)Understood where the page is now, you already have the jquery lib in the header so this code I wrote will rewrite all your local links and not links starting with http:// or https:// which would be offsite links to twitter or your credits etc. Place this anywhere in the page after the jquery lib, recommended at the bottom just in case. Change the URL to whatever you need (if other people need to use it)
<script>
$(document).ready(function() {
var url='http://www.redcliffecityclaytargetclub.com.au';
var href='';
$('a').each(function(){
href=$(this).attr('href');
if (!href.match('^http://') && !href.match('^https://')){ $(this).attr('href',url+href); };
});
});
</script>
-
9. Re: How would you redirect from secure domain following CLEAR CART option
Greg.Tomkins Aug 25, 2014 6:30 AM (in response to TheBCMan)Thank you for that - so I need to insert this into the default template so that the system page that shows after clearing the cart will use the normal domain url domains?
-
10. Re: How would you redirect from secure domain following CLEAR CART option
TheBCMan Aug 25, 2014 6:45 PM (in response to Greg.Tomkins)Put it on any page you want to redirect from, it will overwrite all the links no matter what, if you add it regular pages it is going to overwrite them as well, you might want to put a URL detect at the start of the code, that says something like
if URL="the url you want to redirect from" then "run the code"

