【发布时间】:2015-01-10 23:19:54
【问题描述】:
如果产品具有属性 preorder_note 的值(不管值是什么),我正在尝试调用 cms 块 preorder_note。但我无法让它工作。
这是在页面模板/目录/产品/view.phtml上完成的
<?php if ($_product->getAttribute('preorder_note')): ?>
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('preoder_short')->toHtml() ?>
<?php endif; ?>
我做错了什么?
【问题讨论】:
标签: magento attributes block