Reputation: 392
How to view product price of a product in right side bar,
in Magento product details page?
(my details page is 2column-right)
Any one please help me if know about it and is it possible or not
thank you
Upvotes: 1
Views: 440
Reputation: 7611
First add below code under catalog.xml (app/design/)
<catalog_product_view>
.......
<reference name="right">
<block type="catalog/product_view" name="catalog.product.rightprice" before="-" template="catalog/product/view/rightprice.phtml"/>
</reference>
</catalog_product_view>
Create a phtml(rightprice.phtml) under catalog/product/view
code of rightprice.phtml is
echo Mage::registry('current_product')->getFinalPrice();
Also get More details ,you can try this
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();
}
If any issue let me know
Upvotes: 2