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.
[crayon-63d3e7bc414d1696387177/] Using above fucntion Images can be imported directly from...
Override view block using di.xml and add the below code...
You can check a list of called layout XML for...
Follow the below steps to install and set up PWA...
If you want to remove all leading zero's from order,...
Let our Magento expert connect to discuss your requirement.
We offer Magento
certified developers.
Our Magento clientele
is 500+.
We sign NDA for the
security of your projects.
We’ve performed 100+
Magento migration projects.
Free quotation
on your project.
Three months warranty on
code developed by us.