开发者

Magento module correct place to put additional files

开发者 https://www.devze.com 2023-03-14 20:32 出处:网络
I\'m writing a module that needs to send an xml string to a 3rd party once an order is placed. The xml is in a particular format that I need to keep it in.

I'm writing a module that needs to send an xml string to a 3rd party once an order is placed. The xml is in a particular format that I need to keep it in. I wa开发者_运维技巧s going to have the xml template stored somewhere so I could read it in and replace the required tags with my data in my observer.

My question is, where is the best place to store that xml file? Can I simply create a new folder in my module for "extras" and have it in there? Or is that bad practice?

Thanks


Most XML files for modules are usually stored in /etc/. I would keep it there, and if you ever need to make changes, you'll know where to look, as all other XML config files are stored there.

Edit: by /etc/ I mean: /app/code/local/Name/Module/etc/

0

精彩评论

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