Magento show FROM price on configurable products

2013-01-21 07:18:33Damodar Bashyal


Magento displays base price set on configurable product as price on product listing pages and on product view page before attribute is selected. Client wanted to display either price range from simple products associated to it or show 'From' in front of the price, so it doesn't look like misleading because the price changes when attribute is selected e.g. different price for different size, that would turn off the customers.

So, this is what I did to add 'from' on the prices.

NOTE: This was tested on magento enterprise version

Around line 50, I added this:

$priceFromText = '';
if($_product->getData('type_id') == 'configurable'){
    $priceFromText = Mage::helper('tax')->__('From: ');
<span class="price-label"><?php echo Mage::helper('tax')->__('Price') ?>:</span>

Line 76,82,89,95 and so on ... I added <?php echo $priceFromText ?> e.g.:

<?php echo $priceFromText ?><?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?>

But these lines:

<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>

I updated to:

<?php //echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>
<span class="price"><?php echo $priceFromText ?><?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?></span>

And, on line 200, I updated:

<?php if ($_finalPrice == $_price): ?>
	<?php echo $_coreHelper->currency($_price, true, true) ?>
<?php else: ?>
	<?php echo $_coreHelper->currency($_finalPrice, true, true) ?>
<?php endif; ?>


<span class="price"><?php echo $priceFromText ?>
	<?php if ($_finalPrice == $_price): ?>
		<?php //echo $_coreHelper->currency($_price, true, true) ?>
		<?php echo $_coreHelper->currency($_price, true, false) ?>
	<?php else: ?>
		<?php //echo $_coreHelper->currency($_finalPrice, true, true) ?>
		<?php echo $_coreHelper->currency($_finalPrice, true, false) ?>
	<?php endif; ?>

And the result was like this:

Listing page:

Listing page

Product view page: before attribute selected

Product view originally

Product view page: after attribute selected

Product view page


Full code is available on github at:

      Tips: touching links in iPhone for few seconds gives the options to open a link in new window.


Dear Marcus, if you find the solution, please let me know!

03/01/14 09:16:05| Caroline

@Marcus it should be possible. Sorry but too busy to try myself and help you at the moment.

11/12/13 07:45:04| Damodar

Dear Damodar, your code looks good. Is is also possible to remove the "From:" if you have a configurable product where the prices of all variants are the same? Best regards, Marcus

11/12/13 07:40:57| Marcus

Can we update it for Community Edition 1.9

23/07/15 01:21:10| Rajesh



Javascript must be enabled to post comment!


QR Code: Magento show FROM price on configurable products