[英]Magento : list.phtml price
我创建了一个Magento网站,但是价格从list.phtml中消失了,这是我的路线:www.smztw.com/radiator.html为什么? 谁能告诉我如何找回它?
非常感谢
确保模板中包含以下行:
echo $ this-> getPriceHtml($ _ product,true);
如果有此文件,则应调用此文件的方法:
/app/code/core/Mage/Catalog/Block/Product/Abstract.php
这是方法(Magento 1.8):
public function getPriceHtml($product, $displayMinimalPrice = false, $idSuffix = '')
{
$type_id = $product->getTypeId();
if (Mage::helper('catalog')->canApplyMsrp($product)) {
$realPriceHtml = $this->_preparePriceRenderer($type_id)
->setProduct($product)
->setDisplayMinimalPrice($displayMinimalPrice)
->setIdSuffix($idSuffix)
->toHtml();
$product->setAddToCartUrl($this->getAddToCartUrl($product));
$product->setRealPriceHtml($realPriceHtml);
$type_id = $this->_mapRenderer;
}
return $this->_preparePriceRenderer($type_id)
->setProduct($product)
->setDisplayMinimalPrice($displayMinimalPrice)
->setIdSuffix($idSuffix)
->toHtml();
}
问题应该在这里,您可以调试它并找到问题所在。
希望对您有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.