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.
当您在管理面板中创建发票时,观察者的该事件的名称是什么?我试过 *sales_order_invoice_register* 和 *sales_order_invoice_pay* 但它不起作用。
对于 Magento >= 1.4,有几个选项 - 最好的选择是您列出的事件,sales_order_invoice_register.
sales_order_invoice_register
因为发票模型将_eventPrefix属性设置为sales_order_invoice,所以可以观察sales_order_invoice_save_after。
_eventPrefix
sales_order_invoice
sales_order_invoice_save_after
确保您使用的是正确的事件配置区域:adminhtml vs frontend vs global。