Magento module correct place to put additional files

淺唱寂寞╮ 提交于 2020-01-15 11:58:10

问题


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 was 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


回答1:


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/



来源:https://stackoverflow.com/questions/6440682/magento-module-correct-place-to-put-additional-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!