Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
非常努力地理解 Magento 的代码。
如果购物车中的商品已经打折,我需要一种拦截优惠券代码的方法,以防止它们工作。
我怎样才能做到这一点?
这可以通过使用观察者订阅controller_action_predispatch_checkout_cart_couponPost事件来实现。
controller_action_predispatch_checkout_cart_couponPost
或者通过覆盖购物车控制器。具体来说,couponPostAction方法
couponPostAction