Magento模块放置其他文件的正确位置 [英] Magento module correct place to put additional files

查看:54
本文介绍了Magento模块放置其他文件的正确位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个模块,一旦下订单,该模块需要将xml字符串发送给第三方. xml是我需要保留的特定格式. 我打算将xml模板存储在某个位置,以便可以读取它,并在观察器中用我的数据替换所需的标签.

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.

我的问题是,存储该xml文件的最佳位置在哪里?我可以简单地在模块中为"extras"创建一个新文件夹并将其放在其中吗?还是那不好的做法?

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?

谢谢

推荐答案

大多数模块的XML文件通常存储在/etc/中.我会把它保存在那儿,如果您需要进行更改,那么您会知道在哪里看,因为所有其他XML配置文件都存储在那儿.

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.

/etc/我的意思是:/app/code/local/Name/Module/etc/

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

这篇关于Magento模块放置其他文件的正确位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆