Skip to main content

Posts

Showing posts from March 9, 2015

How to Show product Price in product List page

first add this code block after list or grid mode wherever you want <?php if($_product->isConfigurable()): ?>  <?php $attributes = $_product->getTypeInstance(true)->getConfigurableAttributes($_product) ?>  <?php if(count($attributes)): ?> <?php foreach($attributes as $att): ?>  <?php $pAtt=$att->getProductAttribute(); //get the child products $allProducts = $_product->getTypeInstance(true)->getUsedProducts(null, $_product); $frontValues =array() ?>   <?php //echo $pAtt->getFrontendLabel() ?>   <?php foreach($allProducts as $p): ?>  <?php if(!$p->isSaleable()) continue; ?> <?php $out=$p->getAttributeText($pAtt->getName()); ?> <?php $frontValues[$out]=$out; ?>   <?php endforeach ?> <?php endforeach ?> <?php endif ?> <?php endif ?> <?php /* if ($_product->getData('type_id')