Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Manually adding an item to the cart with $cart->add_cart


TTYd

Recommended Posts

Thanks for the previous help, think I just have one last question!

 

This is a simplified version of the scenario, but whenever the customer buys an item I want another item to be automatically added to the cart. I have experimented with adding

$cart->add_cart(35,1);

to application_top.php, which does indeed add pid35 to the cart, but it does not increment the quantity for each item that is ordered (there is only ever 1 in the cart). How does add_cart work exactly, is there a parameter that will do soemthing like;

$cart->add_cart(35,existing quantity+1)

so that each new item causes the number to increase?

 

Thanks in advance!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...