our social enterprise sells reclaimed carpet tiles, we generally have about 3 sizes whcih are defined as an atrtribute of simple products. We quote the per tile price becuase the catalogue is managed per tile but we would like to be able to quote a /m2 price and a /box price. This needs me to pull the size attribute and do some calculations. It feels like I need to include some kind of helper function that I pass a product object and which returns this display content rather than just hacking price.phtml to do it, but I have no idea how I should do this in magento.

Can anyone advise of the correct approach?

Using CE 1.8.1 and customised argento theme.


If you are familiar with creating modules then I would create a module and add a helper model with methods to accept the product object, perform the calculations you want and return the data to your price.phtml template file i.e.


You could of course also just code this into the price.phtml template file too.

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.