getChildHtml(‘media’) returning blank in view.phtml magento

…衆ロ難τιáo~ 提交于 2019-12-24 03:25:59

问题


Till yesterday all was fine, all of sudden<?php getChildHtml(‘media’) ?> is not returning any html just blank in view.phtml. I checked catalog.xml file:

<reference name="content">
<block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">
<block type="catalog/product_view_media" name="product.info.media" as="media" template="catalog/product/view/media.phtml" />
</block>
</reference>

Where else I need to check to make it run again?


回答1:


Praveen,Please try this

<?php echo $this->getBlockHtml('media') ?>

Instead of

<?php getChildHtml(‘media’) ?>

as per as your code $this missing



来源:https://stackoverflow.com/questions/29763228/getchildhtml-media-returning-blank-in-view-phtml-magento

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