X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   help adding a back button to detailed product page (https://forum.x-cart.com/showthread.php?t=43721)

cbostard 11-17-2008 05:20 AM

help adding a back button to detailed product page
 
can anyone give me some input as to how I would be able to add a back button that would take a customer back to the last page they came from, I would like to put the button in the product detail page.
Thanks in advance.

balinor 11-17-2008 06:14 AM

Re: help adding a back button to detailed product page
 
Welcome to the X-Cart forums! Please start by reading the following thread, which will help you get started and hopefully make your experience here a positive one:

http://forum.x-cart.com/showthread.php?t=23970

Please note that this link is not an answer to your question, but we need you to update your signature with your X-Cart version so that we can answer your questions correctly. Thanks! :)

cbostard 11-17-2008 08:52 AM

Re: help adding a back button to detailed product page
 
thanks, i updated some information about me :lol:

JWait 11-22-2008 05:38 AM

Re: help adding a back button to detailed product page
 
Try adding this...
{include file="buttons/button.tpl" button_title="BACK" href="javascript: history.go(-1);" style="button" js_to_href="Y"}

cbostard 11-23-2008 05:56 AM

Re: help adding a back button to detailed product page
 
thanks JWait, that was great, I just inserted it into skin1/product.tpl and appeared
if you are able to give me some instructions as on how to seperate the buttom further away from the buy button, lets say to the right side of the details area.
here is a link if anyone would like to see http://www.thepreppypalm.com/store/product.php?productid=16168&cat=0&page=1
thanks alot. all your help is appreiciated
Chris

JWait 11-23-2008 06:24 AM

Re: help adding a back button to detailed product page
 
There are several ways to get what you want..

You can add <img src="{$ImagesDir}/spacer.gif" width="150" height="1" alt="" /> before the "back" code. That will put a 150 pixel space between your buttons.

You can make the table cell that the "back" code resides in align to the right... <td align="right">.

You can add a "AlignRight" class to skin1.css and make the cell align that way... <td class="AlignRight"> (add .AlignRight {align: right; } to skin1.css )

cbostard 11-23-2008 10:48 AM

Re: help adding a back button to detailed product page
 
Not sure if im inserting this correctly but it is not spacing them apart. this is how i have it in product.tpl
PHP Code:

<tr>
 <
td>{include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}</td>
<
td>
<
img src="{$ImagesDir}/spacer.gif" width="150" height="1" alt=""/>
{include 
file="buttons/button.tpl" button_title="BACK" href="javascript: history.go(-1);" style="button" js_to_href="Y"}
</
td


it acutally offsets them up and down on the same line,
thanks for taking time to answer
Chris

JWait 11-23-2008 10:59 AM

Re: help adding a back button to detailed product page
 
I'm not sure why... probably yet another of x-cart's nested tables. Try ..
Code:

<tr>
 <td>{include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}</td>
<td align="right">
<img src="{$ImagesDir}/spacer.gif" width="150" height="1" alt=""/>
{include file="buttons/button.tpl" button_title="BACK" href="javascript: history.go(-1);" style="button" js_to_href="Y"}
</td>


cbostard 11-23-2008 12:51 PM

Re: help adding a back button to detailed product page
 
ok great, that got it to spread apart. thanks a bunch. :)

tam10 11-27-2008 09:02 AM

Re: help adding a back button to detailed product page
 
Works great. Thanks.

Can someone please tell me how to add "back" to language lbl
so i can change the color to suit the page.

Thank you in advance.
Tammy

JWait 11-30-2008 04:26 AM

Re: help adding a back button to detailed product page
 
I just threw button_title="BACK" in there because it was quick. You can always change it to use a language variable... button_title=$lng.lbl_go_back should work just as well.

cbostard 11-30-2008 06:41 AM

Re: help adding a back button to detailed product page
 
Quote:

Originally Posted by JWait
I'm not sure why... probably yet another of x-cart's nested tables. Try ..
Code:

<tr>
 <td>{include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}</td>
<td align="right"
<img src="{$ImagesDir}/spacer.gif" width="150" height="1" alt=""/>
{include file="buttons/button.tpl" button_title="BACK" href="javascript: history.go(-1);" style="button" js_to_href="Y"}
</td>





This should now align up correctly as the buttons were offset up and down slightly


All times are GMT -8. The time now is 12:35 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.