Change the number of decimals

  • Posts: 1
  • Thank you received: 0
13 years 5 months ago #19314

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.

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
13 years 5 months ago #19315

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.059 seconds
Powered by Kunena Forum