Developer forum

Forum » Development » Add To Cart
Judy Zhang
Reply
 Generally, when the user clicks "Add To Cart", the product will be added to the order as an orderline with whatever quantity the user has written. 
And if the user clicks again, the new quantity will be added up to the exising quantity in the orderline.
 
But our customer has another requirement, that when the user clicks "Add to Cart" for the first time, it should just works as it does today. But when the user clicks it again, the orderlines quantity should be totally replaced by the new quantity, instead of  by the new quantity added up to the existing quantity in the orderline.
 
So my question is, that is there any link like "/default.aspx?id=&productid=&VariantID=&cartcmd=add&quantity=" + document.getElementById("selectQuantityBrochure").value" I can call to fufill the new requirement? Or I should subscribe an event to override the "Add to Cart" function?

Can you guys give me an hint?

Replies

 
Vladimir
Reply
Hi Judy!
I think these links will help you:
http://developer.dynamicweb-cms.com/forum/templates/adding-many-of-the-same-product-to-cart.aspx?PID=48
http://developer.dynamicweb-cms.com/forum/development/how-to-add-multiple-items-to-the-shoppingcart.aspx?PID=48

Best regards,
Vladimir

 

You must be logged in to post in the forum