What's the best way to display the price of the product & display a price per kilo.

We have added in all the weight in grams so I suppose we could do the following

Price Per Kilo = (product price / weight in grams) * 1000

However wanted to see if there was a native way of doing this or a ready built extension

5 Answers 5


In Germany we have a law for this base price. So there is a module which implements this:


Maybe a newer version is on http://de.nr-apps.com/ but the website is not loading in the moment, so only this link.


I have ended up doing the maths in the html

<div class="price-per-kilo">
    <?php echo Mage::helper('core')->currency(number_format(((Mage::helper('tax')->getPrice($_product, $_product->getFinalPrice())) / $_product->getWeight()) * 1000,2),true,true); ?>
    <?php echo $this->__("per kilo")?>

There isn't anything native for this. My recommendation is to develop an extension that either computes it at product load (i.e. product page) or an observer that listens to a product-before-save event and updates it as an attribute.


If you know the price per KG of your products you could add a new attribute to your products.

If you want to calculate this in your code then you can do it easily. In your view.phtml you could do something like this:

    var price = <?php echo ($_product->getPrice()) ?>;
    var weight = <?php echo ($_product->getWeight()) ?>;

Though this doesn't work for every case, here is the simplest way of making it work.

Create a product called 1Kg - Bananas (just an example) this way to add another Kilo all the customer needs to do is add qty.

Would this work for your case

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.