开发者

Save file in magento after checkout completation

I need to save a file after a succesfully checkout. So I'm using the checkout_type_onepage_save_order_after event. When checking out, it stucks if I have some shitty code in there but it goes nicely if I have valid code in the observer. So it gets called, at least I think it does. Can't test it since it doesn't write my file, doesnt write anything in the log etc. So, what could be wrong? Why doesn't it write some stuff into the log? As I said, with other events it wor开发者_JAVA百科ks perfectly. It's a new magento installation.

http://pastebin.com/TWyj6CYt cache is disabled. I'm using 1.5


I suggest you use the following event : sales_model_service_quote_submit_after

This event triggers right after the successful creation of an order.

You can also use Mage::log("Observer called"); just to check if your event observer is being invoked.

I hope this helps you :)


You have a class name Xxx_saveCheckout_Model_Observer. Class name parts usually all have uppercase initial letters, the autoloader expects that. Try changing it to Xxx_SaveCheckout_Model_Observer (with a capital 'S').

Also make sure the config file has a /config/global/models section, although it might be missing from your pastebin on purpose.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜