Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

help adding a back button to detailed product page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-17-2008, 05:20 AM
 
cbostard cbostard is offline
 

Advanced Member
  
Join Date: Dec 2007
Location: USA/ New Jersey
Posts: 47
 

Default 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.
__________________
Version 4.3.1
fancy catagories (enabled)
dynamic image generator 4.1(enabled)
tabbed menu buttons
Cdseo Pro (enabled)
anonymous cart mod (enabled )
skin swap "mod doesnt work well for me"
x-magnafier
xcart Gift registry
Reply With Quote
  #2  
Old 11-17-2008, 06:14 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default 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!
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 11-17-2008, 08:52 AM
 
cbostard cbostard is offline
 

Advanced Member
  
Join Date: Dec 2007
Location: USA/ New Jersey
Posts: 47
 

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

thanks, i updated some information about me
__________________
Version 4.3.1
fancy catagories (enabled)
dynamic image generator 4.1(enabled)
tabbed menu buttons
Cdseo Pro (enabled)
anonymous cart mod (enabled )
skin swap "mod doesnt work well for me"
x-magnafier
xcart Gift registry
Reply With Quote
  #4  
Old 11-22-2008, 05:38 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default 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"}
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #5  
Old 11-23-2008, 05:56 AM
 
cbostard cbostard is offline
 

Advanced Member
  
Join Date: Dec 2007
Location: USA/ New Jersey
Posts: 47
 

Default 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
__________________
Version 4.3.1
fancy catagories (enabled)
dynamic image generator 4.1(enabled)
tabbed menu buttons
Cdseo Pro (enabled)
anonymous cart mod (enabled )
skin swap "mod doesnt work well for me"
x-magnafier
xcart Gift registry
Reply With Quote
  #6  
Old 11-23-2008, 06:24 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default 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 )
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #7  
Old 11-23-2008, 10:48 AM
 
cbostard cbostard is offline
 

Advanced Member
  
Join Date: Dec 2007
Location: USA/ New Jersey
Posts: 47
 

Default 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
__________________
Version 4.3.1
fancy catagories (enabled)
dynamic image generator 4.1(enabled)
tabbed menu buttons
Cdseo Pro (enabled)
anonymous cart mod (enabled )
skin swap "mod doesnt work well for me"
x-magnafier
xcart Gift registry
Reply With Quote
  #8  
Old 11-23-2008, 10:59 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default 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>
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #9  
Old 11-23-2008, 12:51 PM
 
cbostard cbostard is offline
 

Advanced Member
  
Join Date: Dec 2007
Location: USA/ New Jersey
Posts: 47
 

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

ok great, that got it to spread apart. thanks a bunch.
__________________
Version 4.3.1
fancy catagories (enabled)
dynamic image generator 4.1(enabled)
tabbed menu buttons
Cdseo Pro (enabled)
anonymous cart mod (enabled )
skin swap "mod doesnt work well for me"
x-magnafier
xcart Gift registry
Reply With Quote
  #10  
Old 11-27-2008, 09:02 AM
  tam10's Avatar 
tam10 tam10 is offline
 

eXpert
  
Join Date: Mar 2007
Posts: 252
 

Default 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
__________________
Tammy
x-cart gold + 4.7.2
x-cart 5.2.10

Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:10 AM.

   

 
X-Cart forums © 2001-2020