Update product option without adding new product

Anikesh Das asked on September 29, 2014 14:37

Hi, I need to restrict same product multiple times in shopping cart. If an user adds same product with different option then it will update the same product in shopping cart with new option selection instead of adding new product.

Recent Answers


Kentico Support Engineer answered on November 20, 2014 16:10

Hi Anikesh,

Thank you for your message.

There is no such feature in the Kentico E-Commerce module, so the only solution is to ensure this with custom logic. The best place for this is probably in the ShoppingCartItemSelector control, located here:

\CMS\CMSModules\Ecommerce\Controls\ProductOptions\ShoppingCartItemSelector.ascx

In the code of this control you will need to extend the method AddProductToShoppingCart, and add a custom logic that removes all instances of the product from ShoppingCart.CartItems based on the SKUID property.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.