By default Magento bundle product display min price on the listing page and full price on the product page.
Today I’m sharing you the list page to show the same price as the product page because it’s confusing for customers when they see the different prices.
You have to override below file in your appropriate theme:
1 |
app/design/frontend/base/default/template/bundle/catalog/product/price.phtml |
Then put below code after:
1 |
$_priceModel = $_product->getPriceModel(); [around line no. 45] |
1 2 3 4 5 6 7 8 9 10 11 |
$product = Mage::getModel('catalog/product')->setStoreId(Mage::app()->getStore()->getId())->load($_product->getId()); $collection = $product->getTypeInstance(true) ->getSelectionsCollection($product->getTypeInstance(true)->getOptionsIds($product), $product); $totalPriceArray = []; foreach ($collection as $item) { $price = $_product->getPriceModel()->getSelectionPreFinalPrice($_product, $item, $item->getQty()); $priceTax = $_taxHelper->getPrice($item, $price); $formated = $priceTax; $totalPriceArray[] = $formated; } $finalPrice = array_sum($totalPriceArray); |
Now replace the current price variable to $finalPrice [like $_minimalPriceTax its depend on tax settings you have to find excet condition which is a call for your list page]
For example, I am replacing below line:
1 |
Old Line : <?php echo $_coreHelper->currency($_minimalPriceTax) ?> |
1 |
Replace Line: <?php echo $_coreHelper->currency($finalPrice) ?> |
Now reload your list page and see price should be the same as like product page.
Please follow the below methods to get the attribute options...
Update product attribute value programmatically in Magento 2 . [crayon-628778c4217e4780927804/]...
If you want restrict customer to checkout based on your...
Sometime we need to set html data without load or...
If you want get query string params in controller file,...