1

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.

  • I appear to have found an extension that does what I need (or close to) as a last resort however... – zigojacko Jun 29 '16 at 13:06
4

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 ?>
  • Only just seen your answer and no idea what I did in the end with regards to my original question but given your solution looks sound and is gaining upvotes, I've marked it as the accepted answer. Thanks. – zigojacko Jun 27 '18 at 10:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.