View Single Post
  #4  
Old 12-17-2004, 06:33 AM
  kpayne's Avatar 
kpayne kpayne is offline
 

X-Adept
  
Join Date: Dec 2002
Location: Firetanksoftware.com
Posts: 469
 

Default

I've actually done this mod before. It was quite complex because it affected the big hairy functions in func.php that create the cart object & your order totals, etc. That means that your upgradability goes right out the window.

We had done just what cotc said, add a product to the cart, but we let it be visible. If you used a certain coupon code it would add the product to the cart automatically and set the value of the coupon to the price of the product. If you removed the coupon, or didn't qualify anymore (because you removed something from the cart, etc.) then the product would just be full price and still in your cart.

Sadly, the mod was done for 3.3.4 and would have to be recreated for a current version of the cart. And, again, because it touches some of the sensitive parts of the cart, I don't want to code it, release it, support it, and follow x-cart's upgrades with it and I wouldn't expect any of the other devs to want to do that either.

One solution I have seen, though, is to just add an option to a product. Put in the description that this product comes with a free t-shirt, then put "Free Shirt Color" as a product option and make sure the people packing your orders know to include a free shirt!

That approach is very safe, but also very limited.
__________________
X-cart Featured Products Manager from http://www.firetanksoftware.com - Put your products where you want, how you want.
Reply With Quote