Skip to main content

Change the number of decimals

More
15 years 3 months ago #19314 by Sinom
Greetings.

I've been trying to change the number of decimals on the product dimensions, such as weight and length.

I thought it had something to do with:
<?php if(isset($this->element->product_weight) && bccomp($this->element->product_weight,0,3)){ ?>

I tried editing the Display > Views > show (View - product) but to no avail.

Any push to the right way is appreciated.

- Sinom

Please Log in or Create an account to join the conversation.

More
15 years 3 months ago #19315 by nicolas
You're close. It's two lines below.
You should change the code:
$this->element->product_weight
to:
round($this->element->product_weight,X)

where X is the number of decimals you want.

Please Log in or Create an account to join the conversation.

Time to create page: 0.139 seconds
Powered by Kunena Forum