Reputation: 107
How I could get bundle product original price when price is set to dynamic (price excluding special - when is setup)?
I'm trying like this:
<?php echo Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol().number_format($_product->getPrice(),2) ?>
But it works only for fixed price, if price is dynamic it show 0.00
Best would be method that will work for both prices: fixed and dynamic
Upvotes: 0
Views: 3847
Reputation: 5381
This will give you bundle product dynamic price including tax Mage::getModel('bundle/product_price')->getTotalPrices($_product,'max',1);
This will give you bundle product dynamic price excluding tax Mage::getModel('bundle/product_price')->getTotalPrices($_product,'max',0);
Just pass your product object correctly.
Upvotes: 0
Reputation: 172
See the app/design/frontend/base/default/template/bundle/catalog/product/price.phtml
$_product = $this->getProduct();
$_priceModel = $_product->getPriceModel();
list($_minimalPriceTax, $_maximalPriceTax) = $_priceModel->getTotalPrices($_product, null, null, false);
list($_minimalPriceInclTax, $_maximalPriceInclTax) = $_priceModel->getTotalPrices($_product, null, true, false);
string ~128 - formatted the bundle price with dynamic type.
<?php if ($_minimalPriceTax <> $_maximalPriceTax): ?>
Upvotes: 1