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

adding free items to cart

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 09-06-2006, 10:21 PM
  wjbrewer's Avatar 
wjbrewer wjbrewer is offline
Banned
 

X-Adept
  
Join Date: Feb 2005
Location: Pittsburgh, PA
Posts: 504
 

Default Re: Automatically adding free items

Quote:
Originally Posted by simonhelps
The most important one is how can you limit the free product qty to 1 item only regardless of how many products are put in the cart (the code above adds a free item every time a product is added but our store is giving a free gift per order made not per product.

Is there code that could be added that checks that the cart has a product in it (other then the free one). At the moment if someone puts a product in the cart the code above adds the free item (or whatever item specified) to the cart, but if the original item is then deleted from the cart , this free item remains there. Is there a bit of code that can check for this? As it is the item I am specifing is a free item and the cart will not allow a checkout with a subtotal of $0.00 but if this code was straight forward it would be nice.

Sorry, I don't have an easy solution for you on these. You will either have to dig into the cart functions, or have a custom mod that limits the quantity based on price, and delete all products when the cart has items but the total is 0.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 11:40 AM.

   

 
X-Cart forums © 2001-2020