Magento 1.9 – Display Old Price in Dynamic Bundle Product Price

bundled-productmagento-1.9price

Wanting to show the old price ('was' with strikethrough) in the main bundle product dynamic price.

Struggling to figure out how to do this though.

It is specifically the price in bundle/catalog/product/view/price.phtml.

Seems to load the price via the javascript .reloadPrice and I haven't a clue how to modify this (if that is what I even have to do) to include the old price…

Is this doable?

The reason for wanting to do this is to show the price discount when the product is on special offer.

I have tried looking into this but this modifies a different price template that isn't being used in my case and it doesn't work in the template I'm using.

Best Answer

Sorry for the late response but I just faced this myself and solved it as follows...

In bundle/catalog/product/price.phtml (Not bundle/catalog/product/view/price.phtml) find the block of code that relates to your specific configuration. In my case it was the block beginning at line 263

<?php echo $_coreHelper->currency($_minimalPriceTax) ?>

Replace this one line with the following code...

<?php
$_store = $_product->getStore();
$_id = $_product->getId();
$_convertedPrice = $_store->roundPrice($_store->convertPrice($_product->getPrice()));
$_price = $_taxHelper->getPrice($_product, $_convertedPrice);

$_formattedPrice = $_coreHelper->formatPrice($_price, false);
$_priceWithDiscount = $_coreHelper->currency($_minimalPriceTax);

if ($_price != $_minimalPriceTax): ?>
<p class="old-price">
    <span class="price-label"><?php echo $this->__('Regular Price:') ?>    </span>
    <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
        <?php echo $_formattedPrice ?>
    </span>
</p>
<?php endif; ?>
<?php echo $_priceWithDiscount ?>