【发布时间】:2013-10-17 11:26:58
【问题描述】:
Magento 1.8 版 从版本 1.5 升级后出现问题
在 checkout/cart.phtml 中有代码:
<?php foreach($this->getItems() as $_item): ?>
<?php echo $this->getItemHtml($_item) ?>
<?php endforeach ?>
$this->getItemHtml($_item) 应该呈现模板 /cart/item/default.phtml 但它没有!
我改成:
<?php foreach($this->getItems() as $_item): ?>
<?php echo $_item->getId(); ?>
<?php endforeach ?>
而且它确实显示了我购买的产品 id
为什么它不呈现模板?
【问题讨论】:
-
检查文件是否存在:template\checkout\cart\item\default.phtml
-
所有需要的文件都存在
-
OK,从 Sytem->Configuration->Developer->Log Settings 启用 [system/exception].log 看看有没有什么有用的,如果没有,然后调试 default.phtml