如何在magento产品详细信息页面的右栏中查看产品价格
如何在右侧栏中查看产品的产品价格 在Magento产品详细信息页面中 (我的详细信息页面右侧2列) 如果有人知道这件事,请帮助我,可能吗如何在magento产品详细信息页面的右栏中查看产品价格,magento,Magento,如何在右侧栏中查看产品的产品价格 在Magento产品详细信息页面中 (我的详细信息页面右侧2列) 如果有人知道这件事,请帮助我,可能吗 谢谢首先在catalog.xml(app/design/)下添加以下代码 还可以获得更多详细信息,您可以试试这个 if(Mage::registry('current_product')){ $product=Mage::registry('current_product'); $displayMinimalPrice = false; $idSuffix =
谢谢首先在catalog.xml(app/design/)下添加以下代码 还可以获得更多详细信息,您可以试试这个
if(Mage::registry('current_product')){
$product=Mage::registry('current_product');
$displayMinimalPrice = false;
$idSuffix = '-right';
$type_id = $product->getTypeId();
if (Mage::helper('catalog')->canApplyMsrp($product)) {
$realPriceHtml = $this->_preparePriceRenderer($type_id)
->setProduct($product)
->setDisplayMinimalPrice($displayMinimalPrice)
->setIdSuffix($idSuffix)
->setIsEmulateMode(true)
->toHtml();
$product->setAddToCartUrl($this->getAddToCartUrl($product));
$product->setRealPriceHtml($realPriceHtml);
$type_id = $this->_mapRenderer;
echo $this->_preparePriceRenderer($type_id)
->setProduct($product)
->setDisplayMinimalPrice($displayMinimalPrice)
->setIdSuffix($idSuffix)
->toHtml();
}
如果有任何问题,请告诉我此操作正常,但formatCurrency()不正常。我在操作中遇到了一个小问题,您能帮助我吗?
echo Mage::registry('current_product')->getFinalPrice();
if(Mage::registry('current_product')){
$product=Mage::registry('current_product');
$displayMinimalPrice = false;
$idSuffix = '-right';
$type_id = $product->getTypeId();
if (Mage::helper('catalog')->canApplyMsrp($product)) {
$realPriceHtml = $this->_preparePriceRenderer($type_id)
->setProduct($product)
->setDisplayMinimalPrice($displayMinimalPrice)
->setIdSuffix($idSuffix)
->setIsEmulateMode(true)
->toHtml();
$product->setAddToCartUrl($this->getAddToCartUrl($product));
$product->setRealPriceHtml($realPriceHtml);
$type_id = $this->_mapRenderer;
echo $this->_preparePriceRenderer($type_id)
->setProduct($product)
->setDisplayMinimalPrice($displayMinimalPrice)
->setIdSuffix($idSuffix)
->toHtml();
}