Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在magento产品详细信息页面的右栏中查看产品价格_Magento - Fatal编程技术网

如何在magento产品详细信息页面的右栏中查看产品价格

如何在magento产品详细信息页面的右栏中查看产品价格,magento,Magento,如何在右侧栏中查看产品的产品价格 在Magento产品详细信息页面中 (我的详细信息页面右侧2列) 如果有人知道这件事,请帮助我,可能吗 谢谢首先在catalog.xml(app/design/)下添加以下代码 还可以获得更多详细信息,您可以试试这个 if(Mage::registry('current_product')){ $product=Mage::registry('current_product'); $displayMinimalPrice = false; $idSuffix =

如何在右侧栏中查看产品的产品价格

在Magento产品详细信息页面中

(我的详细信息页面右侧2列)

如果有人知道这件事,请帮助我,可能吗


谢谢

首先在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();
        }