开发者

what's the event name when you create a new invoice in magento?

开发者 https://www.devze.com 2023-04-11 02:33 出处:网络
when you create an invoice in the admin panel, what is t开发者_JAVA百科he name of that event for an observer? I\'ve tried *sales_order_invoice_register* and *sales_order_invoice_pay* but it doesn\'t w

when you create an invoice in the admin panel, what is t开发者_JAVA百科he name of that event for an observer? I've tried *sales_order_invoice_register* and *sales_order_invoice_pay* but it doesn't work.


For Magento >= 1.4 there are a couple of options - the best choice would be the event which you've listed, sales_order_invoice_register.

Because the invoice model sets the _eventPrefix property to sales_order_invoice, you can observe sales_order_invoice_save_after.

Make sure that you are using the correct event configuration area: adminhtml vs frontend vs global.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号