在Magento电子邮件模板中存储名称

时间:2016-01-29 19:11:09

标签: php magento

我正在使用以下代码在admin发送的提醒电子邮件中获取商店名称。

$storeName = Mage::getModel('sales/order')->getStore()->getName();

但是,由于电子邮件是通过管理员发送的,因此商店名称将显示为管理员,而不是 Widgets.com

如何插入商店名称?

2 个答案:

答案 0 :(得分:0)

试试这个:

$store = Mage::app()->getStore();
$storeName = $store->getName();

答案 1 :(得分:0)

如果您仍然可以访问报价(在订单创建期间)

ERROR in [default] C:/WebConnectionProjects/AlbumViewer/Web/src/app/app.module.ts:64:10
Argument of type '{ imports: (ModuleWithProviders | typeof BrowserModule)[]; declarations: (typeof AlbumList | type...' is not assignable to parameter of type 'NgModuleMetadataType'.
  Types of property 'providers' are incompatible.
  Type '(typeof ConnectionBackend | typeof Album | typeof Artist | typeof Track | typeof AppConfiguration...' is not assignable to type 'Provider[]'.
  Type 'typeof ConnectionBackend | typeof Album | typeof Artist | typeof Track | typeof AppConfiguration ...' is not assignable to type 'Provider'.
  Type 'typeof ConnectionBackend' is not assignable to type 'Provider'.
  Type 'typeof ConnectionBackend' is not assignable to type 'FactoryProvider'.
  Property 'provide' is missing in type 'typeof ConnectionBackend'.

按订单商店ID

获取商店名称
 Mage::getSingleton('adminhtml/session_quote')->getStore()->getName();