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

How to change the link for "Add to Cart"???

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-13-2008, 11:31 AM
 
wideeye wideeye is offline
 

Member
  
Join Date: Jan 2008
Posts: 13
 

Default 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.
__________________
Ryan Smith
Ryan@WideEye.eu
http://www.wideeye.eu

X-Cart 4.1
Reply With Quote
  #2  
Old 03-13-2008, 11:46 AM
 
balinor balinor is offline
 

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

Default 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
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 03-13-2008, 12:54 PM
 
wideeye wideeye is offline
 

Member
  
Join Date: Jan 2008
Posts: 13
 

Default 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.
__________________
Ryan Smith
Ryan@WideEye.eu
http://www.wideeye.eu

X-Cart 4.1
Reply With Quote
  #4  
Old 03-13-2008, 01:15 PM
 
wideeye wideeye is offline
 

Member
  
Join Date: Jan 2008
Posts: 13
 

Default 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?
__________________
Ryan Smith
Ryan@WideEye.eu
http://www.wideeye.eu

X-Cart 4.1
Reply With Quote
  #5  
Old 03-14-2008, 11:46 AM
 
inebriate inebriate is offline
 

eXpert
  
Join Date: May 2006
Posts: 301
 

Default Re: How to change the link for "Add to Cart"???

in cart.php look for the redirect section under the mode==add section
__________________
x-cart pro 4.0.18
linux
www.fabric8d.com (currently undergoing construction)
Reply With Quote
  #6  
Old 03-15-2008, 05:19 AM
 
wideeye wideeye is offline
 

Member
  
Join Date: Jan 2008
Posts: 13
 

Default 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.
__________________
Ryan Smith
Ryan@WideEye.eu
http://www.wideeye.eu

X-Cart 4.1
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:01 AM.

   

 
X-Cart forums © 2001-2020