Magento CMS Page/Static Blocks - How to display store name?

北战南征 提交于 2020-01-05 12:16:23

问题


I have number of Magento CMS pages and static blocks which use the variable {{store url=""}} to display the store url address in some text depending which store is being viewed.

I would like to also display the store name. Is there an equivalent which would display the store name, something like {{store name=""}}? ({{store name=""}} doesn't work btw)

I don't have access to the .php files so would like to know if this is possible without access. If not, then I can request changes to the .php, I just need to know what to request.


回答1:


you can use any method on store object:

{{var store.getFrontendName()}}

search your codebase for further reference:

grep '{{store' app/locale/ -rsn



回答2:


Try {{config path="general/store_information/name"}}.



来源:https://stackoverflow.com/questions/7544740/magento-cms-page-static-blocks-how-to-display-store-name

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