简体   繁体   中英

Magento intercept coupon code logic?

Trying super hard to understand Magento's code.

I need a way to intercept coupon codes to prevent them working if an item in the cart is already discounted.

How can I achieve this?

This can be achieved by using an observer, subscribing to the controller_action_predispatch_checkout_cart_couponPost event.

Or by overriding the Cart controller. Specifically, the couponPostAction method

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM