6

My Requirement is

enter image description here To fullfill that requirement i have put this code in app/design/frontend/<theme>/default/template/catalog/product/list.phtml

            <?php 
             $currency_symbol = Mage::app()->getLocale()->currency( $currency_code )->getSymbol();
             $specialprice_col = number_format($_product->getSpecialPrice(),2);
             ?>
            <div class="price"><sup>
                <?php echo $currency_symbol; ?></sup><?php echo number_format($_product->getPrice(),2); ?>
             </div>

but when i put this code it is working perfect in simple product but in bundle product the price shows $0 instead of my setted price. enter image description here

  • Out of curiosity, do you have a minimum QTY set for the global configuration, or those grouped products individually? My understanding is that it calculates the "starting at" for grouped products based on minimum qty that can be ordered. – Steven J Jan 23 '18 at 16:56
5

Finally, I have solved by below code.

<?php  $groupedprice= Mage::getModel('bundle/product_price')->getTotalPrices($_product,'min',1);
       $productType = $_product->getTypeId();
?>

    <div class="price">
        <sup>
            <?php echo $currency_symbol; ?>

        </sup>
            <?php if ($productType == 'grouped') {

           echo number_format($groupedprice,2);

        } else {

             echo number_format($_product->getPrice(),2);
        }
         ?>

     </div>
| improve this answer | |

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.