Intercepting Add to Cart process

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
Hi,

Is there a way to intercept the "Add to Cart" process and based on some logic stop the item being adding to the shopping cart and display a message to the screen?

I'm looking to achieve this by extending nopCommerce and not changing the underlining source code.

Thank you,
Andy
7 years ago
Depending on the situation, you can override on the controller/action level by using ActionFilter. Or you can go a level deeper by overriding ShoppingCartService. Both options can be done using plugins. :)
7 years ago
wooncherk wrote:
Depending on the situation, you can override on the controller/action level by using ActionFilter. Or you can go a level deeper by overriding ShoppingCartService. Both options can be done using plugins. :)



That will do the trick.  Thank you for pointing me in the right direction :-)
7 years ago
No problem! :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.