0

I have an bundle product like this:

Bundle product:
**Option 1:
-subproduct:15$
-subproduct:7$
**Option 2:
-subproduct:5$
-subproduct:20$
In admin of product page, i set Special Price 90%.

In category page, it's display:

Bundle product
As low as:
10.8$

How can i show regular price like this?

As low as:
Reg:12$  Spec:10.8$

Thanks for read.

1

Finally i find a answer, here my code:

$_product     = $this->getProduct();
$typeInstance = $_product->getTypeInstance(true);
$typeInstance->setStoreFilter($_product->getStoreId(), $_product);

$optionCollection = $typeInstance->getOptionsCollection($_product);

$selectionCollection = $typeInstance->getSelectionsCollection(
    $typeInstance->getOptionsIds($_product),
    $_product
);

$options = $optionCollection->appendSelections($selectionCollection, false,
    Mage::helper('catalog/product')->getSkipSaleableCheck()
);
$summin = 0;
$summax = 0;
foreach ($options as $option){
    $selections  = $option->getSelections();
    $minprice = array();
    foreach ($selections as $key => $_selection){
        $minprice[] = $_selection->getFinalPrice();
    }
    $summin += min($minprice);
    $summax += max($minprice);
}

$_minimalPriceBundle = $summin; $_maximalPriceBundle = $summax;

you can put code wherever you want to display.

0

A good place to start would be the active price.phtml template. Examine the section responsible for rendering the grouped product prices. Add in the necessary code to render the regular price.

  • hi @musicliftsme , how can i get regular price to show – Init Mar 18 '15 at 2:52

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.