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)
-   -   adding free items to cart (https://forum.x-cart.com/showthread.php?t=15066)

wjbrewer 09-06-2006 10:21 PM

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.


All times are GMT -8. The time now is 08:23 PM.

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