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.
每当产品的库存数量发生变化时,是否会发生事件?
我试过了:
cataloginventory_stock_item_save_after _after and _before.
但是这个事件只有在产品被保存时才会被触发,而不是在销售或订单取消时触发。
那么有没有一个方便的事件呢?
谢谢和欢呼,马蒂亚斯
cataloginventory_stock_item_save_commit_after在销售时触发。
cataloginventory_stock_item_save_commit_after