europaul Posted July 28, 2013 Share Posted July 28, 2013 Hello. I need to add a back button in the product page (product,tpl). This button has to be the same theme and in 3 languages. I wonder if it is possible to add the same ajax button of "add to cart" but modified so when clicked it send you back. Andy ideas ? Thanks !!! Link to comment Share on other sites More sharing options...
vekia Posted July 28, 2013 Share Posted July 28, 2013 you mean something to return customers to the page viewed before they opened the product page? Link to comment Share on other sites More sharing options...
europaul Posted July 28, 2013 Author Share Posted July 28, 2013 Yes. When a client is in the product page and want to return to the product list. The button has to be like the "add to cart" one, but instead the cart image it must have a left arrow. Link to comment Share on other sites More sharing options...
vekia Posted July 28, 2013 Share Posted July 28, 2013 you can use this code: <a href="#" onClick="history.go(-1)" class="exclusive">{l s='Back'}</a> Link to comment Share on other sites More sharing options...
europaul Posted July 28, 2013 Author Share Posted July 28, 2013 Great ! I already have the back arrow button to put next the to the back button, as "add to cart" button has the cart image. I think is something about span, but thats all.. Thanks ! Link to comment Share on other sites More sharing options...
vekia Posted July 28, 2013 Share Posted July 28, 2013 but code that i mentioned works as you expect? i checked it several times and it looks and works well Link to comment Share on other sites More sharing options...
europaul Posted July 29, 2013 Author Share Posted July 29, 2013 Yes, sorry. The code works great !. But i need also to add the same image that has the "add to cart" button. That little basket, but instead i have made a "left arrow". But i dont know exactly how to add that image next to the button. Link to comment Share on other sites More sharing options...
vekia Posted July 29, 2013 Share Posted July 29, 2013 try with this: <a href="#" onClick="history.go(-1)" class="exclusive" style="position:relative;"><span style="position:absolute; left:-50px; top:0px;"><img src="YOURIMGHERE"/></span>{l s='Back'}</a> of course you can customize the position of the span with image, just change the left and top values Link to comment Share on other sites More sharing options...
Recommended Posts