Page 1 of 1

Adding a Return Link on Products pages

Posted: Thu Aug 23, 2018 4:01 am
by rvjventures
Hello, All,
I am currently using OC 2.3.0.2.
I am trying to add a return link to the main page on all my products pages.
I've only gotten this far and need some assistance.
This is what I have so far:

Here is one of my links to test the link:
http://www.kitchenmerchant.net/cart/ind ... uct_id=121

/cart/catalog/controller/product/product.php
<div>
<button type="button"><a href="javascript:history.go(-1)" onMouseOver="self.status=document.referrer;return true" class="button"><span>Go Back</span></a></button>
</div>

Can anyone tell me what I am missing?

Re: Adding a Return Link on Products pages

Posted: Thu Aug 23, 2018 7:45 am
by straightlight
If you have SSL installed, it would not be suggested to use the history -1 function. Rather define the redirection page from the controller and call it from your TPL file afterwards.

Re: Adding a Return Link on Products pages

Posted: Thu Aug 23, 2018 8:47 am
by rvjventures
I tried that and still didn't work.

<div>
<button type="button"><a href="http://www.kitchenmerchant.net/cart/ind ... ommon/home" onMouseOver="self.status=document.referrer;return true" class="button"><span>Go Back</span></a></button>
</div>

Re: Adding a Return Link on Products pages

Posted: Thu Aug 23, 2018 9:00 am
by rvjventures
Nevermind...I figured it out.
Thanks.

<div class="buttons">
<div class="pull-left"><a href="http://www.kitchenmerchant.net/cart/ind ... ommon/home" class="btn btn-primary">Go Back!</a></div>
</div>