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)
-   -   How to change the link for "Add to Cart"??? (https://forum.x-cart.com/showthread.php?t=38293)

wideeye 03-13-2008 11:31 AM

How to change the link for "Add to Cart"???
 
Hi, I'd like to know how to make the "Add to Cart" button and "Add to Wishlist" button redirect the customer to a page other than the cart or the product page. The page that the customer is redirected to should be seperate from the rest of the site, like a popup window that purely states that the product has been succesfully added (if it was succesfully added) and two buttons ("Continue shopping" and "View Cart").

I've had a look at the code for the add_to_cart.tpl and button.tpl but can't work out how to do this. :?

If anyone can tell me I'll be very happy.

Thanks,
Jono.

balinor 03-13-2008 11:46 AM

Re: How to change the link for "Add to Cart"???
 
No need to recreate the wheel:

http://www.websitecm.com/x-cart-mods/ezupsell.html

wideeye 03-13-2008 12:54 PM

Re: How to change the link for "Add to Cart"???
 
Thanks for the reply Balinor. The mod looks like a possible solution. But it gets a bit more complicated ....

On the site I'm building, when a customer clicks on a product in the product list, the product details load up in a new window within shadowbox (http://mjijackson.com/shadowbox/). If the "Add to Cart" button redirected the customer to a "Product Added" page, the links for "Continue Shopping" and "Checkout" would have to open the link in the parent window and then close shadowbox. I know how to close the shadowbox window: onClick="parent.Shadowbox.close();" but I don't know about the opening links in the parent window AND closing shadowbox. Any idea if that's possible?

Also I wouldn't need to upsell products on the "Product Added" page and I'm a bit reluctant to spend money on the mod because it may not work with the way I'm trying to implement it.

wideeye 03-13-2008 01:15 PM

Re: How to change the link for "Add to Cart"???
 
Ok, I've had a look around and it's possible to open a link in a parent window from the child window and close the child window at the same time ( http://www.dynamicdrive.com/forums/archive/index.php/t-14774.html ) I haven't tested it but I'll give it a go.

So, I could probably use that mod in the way that I want. But does anyone know of a way to make the "Add to Cart" button link to a "Product Added" page without using a mod?

inebriate 03-14-2008 11:46 AM

Re: How to change the link for "Add to Cart"???
 
in cart.php look for the redirect section under the mode==add section

wideeye 03-15-2008 05:19 AM

Re: How to change the link for "Add to Cart"???
 
Thanks very much inebriate. For anyone interested, I found this code in cart.php:

#
# Redirect
#
if ($config["General"]["redirect_to_cart"] == "Y") {
if (!empty($active_modules["SnS_connector"]))
$is_sns_action['AddToCart'][] = $productid;

func_header_location("cart.php");

And changed the "cart.php" to the page I want it to go to. Then I enabled "Redirect Customer to Cart" in the general settings of admin. :o


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

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