- Posts: 88
- Thank you received: 0
Product weight rounding-up
- wonderwilson
-
Topic Author
- Offline
Less
More
14 years 10 months ago #29893
by wonderwilson
Product weight rounding-up was created by wonderwilson
Hi,
I've encountered a strange problem with my product weights rounding-up. On the attached images you can see that I'm entering 2.50 kg, but this is displaying as 3 kg on the front end. Any ideas why this might be happening?
Thanks
Darren
I've encountered a strange problem with my product weights rounding-up. On the attached images you can see that I'm entering 2.50 kg, but this is displaying as 3 kg on the front end. Any ideas why this might be happening?
Thanks
Darren
Please Log in or Create an account to join the conversation.
14 years 10 months ago #29898
by nicolas
Replied by nicolas on topic Re: Product weight rounding-up
Hi,
There should be no rounding made on weight.
Did you change some of the code in the file "show" of the view "product" ?
There should be no rounding made on weight.
Did you change some of the code in the file "show" of the view "product" ?
Please Log in or Create an account to join the conversation.
- wonderwilson
-
Topic Author
- Offline
Less
More
- Posts: 88
- Thank you received: 0
14 years 10 months ago #29902
by wonderwilson
Replied by wonderwilson on topic Re: Product weight rounding-up
No, I've not changed any of the code. It only seems to do it when I add a decimal point - 2.5kg appears as 3kg.
Please Log in or Create an account to join the conversation.
- wonderwilson
-
Topic Author
- Offline
Less
More
- Posts: 88
- Thank you received: 0
14 years 10 months ago #29903
by wonderwilson
Replied by wonderwilson on topic Re: Product weight rounding-up
Hi Nicolas,
Actually, I've changed this on listing_img_title:
Minimum Weight: <?php echo round($this->row->product_weight,0)?><?php echo $this->row->product_weight_unit;?><br>
This removed the zeros after the weight. Is it possible to have only one decimal for exampl 4.2 rather than 4.2000?
Thanks
Darren
Actually, I've changed this on listing_img_title:
Minimum Weight: <?php echo round($this->row->product_weight,0)?><?php echo $this->row->product_weight_unit;?><br>
This removed the zeros after the weight. Is it possible to have only one decimal for exampl 4.2 rather than 4.2000?
Thanks
Darren
Please Log in or Create an account to join the conversation.
- wonderwilson
-
Topic Author
- Offline
Less
More
- Posts: 88
- Thank you received: 0
14 years 10 months ago #29907
by wonderwilson
Replied by wonderwilson on topic Re: Product weight rounding-up
Hi Nicolas,
It's ok - I've fixed it!
Changed:
Minimum Weight: <?php echo round($this->row->product_weight,0)?><?php echo $this->row->product_weight_unit;?><br>
to:
Minimum Weight: <?php echo round($this->row->product_weight,1)?><?php echo $this->row->product_weight_unit;?><br>
Cheers
Darren
It's ok - I've fixed it!
Changed:
Minimum Weight: <?php echo round($this->row->product_weight,0)?><?php echo $this->row->product_weight_unit;?><br>
to:
Minimum Weight: <?php echo round($this->row->product_weight,1)?><?php echo $this->row->product_weight_unit;?><br>
Cheers
Darren
Please Log in or Create an account to join the conversation.
Time to create page: 0.191 seconds