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

Add to cart button needs to redirect to a new page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-29-2008, 07:33 AM
 
kevingibson kevingibson is offline
 

Advanced Member
  
Join Date: Apr 2004
Location: Sunderland, UK
Posts: 51
 

Default Add to cart button needs to redirect to a new page

I have a list of products created in html code and when the client clicks on the product it adds to basket without changing the page however i would like it to add to basket and then take the client to a new page. Its basically a step by step process where they have to select one product at each stage. (This is great if you want them to just add 1 item to the basket without redirecting to the basket page)

Code i have at the moment for the buttons in the product list is:

<a class="Button" href="http://www.xxx.com/cart.php?mode=add&amp;productid=500&amp;amount=1"> <img src="http://www.xxxx.com/skin1/images/go.gif" alt="" border="0" class="GoImage" /></a>

Any help is appreciated

Thank you.
__________________
xcart version 4.0.14
windows server

http://www.3k-design.co.uk
Reply With Quote
  #2  
Old 04-28-2008, 06:23 AM
 
BodyBalance BodyBalance is offline
 

Advanced Member
  
Join Date: Apr 2008
Posts: 44
 

Default Re: Add to cart button needs to redirect to a new page

Anyone have any ideas for this? I am also trying to do something similar.
__________________
Version 4.1.9
Reply With Quote
  #3  
Old 04-28-2008, 09:51 AM
 
exsecror exsecror is offline
 

X-Wizard
  
Join Date: Apr 2007
Posts: 1,284
 

Default Re: Add to cart button needs to redirect to a new page

Add this to the anchor link:

Code:
onclick="javascript:window.open(this.href, '_blank'); return false;"
Reply With Quote
  #4  
Old 04-30-2008, 06:39 AM
 
BodyBalance BodyBalance is offline
 

Advanced Member
  
Join Date: Apr 2008
Posts: 44
 

Default Re: Add to cart button needs to redirect to a new page

Any suggestions on how to turn that in to a functional if then statement?

For example, if they are in category 1 and they click add to cart, then I want them directed to category 4.

If they are in category 2 and click add to cart, i want them directed to category 6.

I have been experimenting with it but I can't seem to get it right.
__________________
Version 4.1.9
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 06:06 AM.

   

 
X-Cart forums © 2001-2020