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)
-   -   Add to cart button needs to redirect to a new page (https://forum.x-cart.com/showthread.php?t=37947)

kevingibson 02-29-2008 07:33 AM

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.

BodyBalance 04-28-2008 06:23 AM

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.

exsecror 04-28-2008 09:51 AM

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;"

BodyBalance 04-30-2008 06:39 AM

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.


All times are GMT -8. The time now is 01:33 AM.

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