How to change Weight Attribute decimals Magento

There is no simple way to change the decimal numbers in the Weight Attribute in Magento.

And is not a specific solution either.

What can we do?

For example, we can force to all numeric attributes to show with 2 decimals.

Open the attributes.phtml located in:

app/design/frontend/YOUR THEME/template/catalog/product/view/

I changed this:

To this:

What it does?

The code above adds a condition is_numeric and uses the round function to round it 😉

After it we just print again the attributes with our new value, in this case $my_data_value

7 comments

Leave a Reply

Add <code> Some Code </code> by using this tags.

*
*