Magento:使用变量在CMS语法中构建商店URL
问题描述:
我正在构建电子邮件模板。我想建立一个URL是这样的:Magento:使用变量在CMS语法中构建商店URL
http://store.com/path/to/page?shipmentid=123
此代码建立正确的网址:
{{store url='path/to/page' _query_shipmentid=123}}
但123
部分应该是动态的。我需要它从这个变量拉:
{{var shipment.id}}
这是可能的吗?我在寻找这样的事情:
{{store url='path/to/page' _query_shipmentid=shipment.id}}
答
使用$
前缀让Magento的知道,它是可变的。此代码应该可以工作:
{{store url='path/to/page' _query_shipmentid=$shipment.getId()}}