Can anyone tell me how to change this? Is it on a template-by-template basis?
Found this answer from a year ago, though Daniel had said he would add it to the next release. Is this still the best answer?
http://forum.opencart.com/viewtopic.php ... 574#p27486
Reason: Topic moved
Using OC version 1.4.8b
http://catandcaboodle.com/
catalog/controller/checkout/cart.php
catalog/controller/error/not_found.php
catalog/controller/information/information.php
For every instance in the above files where the code reads
Code: Select all
$this->data['continue'] = HTTP_SERVER . 'index.php?route=common/home';
Code: Select all
$this->data['continue'] = HTTP_SERVER . "history.back()";
Thanks in advance, all you coding wizards.
Using OC version 1.4.8b
http://catandcaboodle.com/
Code: Select all
$this->data['continue'] = HTTP_SERVER . "history.back()";
Code: Select all
$this->data['continue'] = "history.back()";
In poking around the web, I found some (admittedly old) info on Webmaster World: "If you use sessions then just remember the last page in your session container and use that URI." I don't know what that means, but I did see some code in those controller files about sessions.
I also saw the warning about: "I´d use the $_SERVER['HTTP_REFERER'] superglobal just to be sure. Checking whether the referrer is a valid URI and on your domain might be a good idea as well. After all this could be anything, so simply echoing it will open up your site to all kinds of code injections vulnerabilities."
Apparently this coding of a back button is way more complicated than I thought
But I'd still like to do it if someone can give me the answers.
Change:
Code: Select all
<a onclick="location = '<?php echo str_replace('&', '&', $continue); ?>'" class="button">
Code: Select all
<a onclick="history.back();" class="button">
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Code: Select all
<a href="javascript:history.go(-1)" onMouseOver="self.status=document.referrer;return true" class="button"><span>Continue</span></a>
Free v1.4.9 Extensions: Default Specials | Improved Search | Customer Activity Report | Customer Groups | Royal Mail With Handling | Improved Product Page | Random Products | Stock Report | All Products
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Users browsing this forum: No registered users and 47 guests