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

Redirect customer to cart question

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 11-29-2005, 05:47 PM
 
Light Speed Light Speed is offline
 

X-Adept
  
Join Date: Mar 2003
Posts: 921
 

Default

Quote:
Originally Posted by Jon
No prob of course

If you append &addedtocart=1 to the redirect in cart.php you can use this code in your product.tpl

{if $smarty.get.addedtocart eq "1"}
Show Message
{/if}

Thanks!
Reply With Quote
  #12  
Old 11-29-2005, 07:37 PM
 
Light Speed Light Speed is offline
 

X-Adept
  
Join Date: Mar 2003
Posts: 921
 

Default

It works!

Here is the code:
in cart.php
Code:
Change this in the redirect section: if(!empty($HTTP_REFERER)) { func_header_location($HTTP_REFERER); to this: if(!empty($HTTP_REFERER)) { func_header_location($HTTP_REFERER.'$page&addedtocart=1');

In customer/product.tpl
I added this code from Jon after the add to cart button code:
Code:
{if $smarty.get.addedtocart eq "1"} Product has been added to cart {/if}

I just use text but it could have been a language var like
Code:
{if $smarty.get.addedtocart eq "1"} {$lng.txt_product_added_announ} {/if}
and added that var in the language area of the cart admin.
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 02:42 PM.

   

 
X-Cart forums © 2001-2020