dimension displayed wrong if size multiple of 10

  • Posts: 51
  • Thank you received: 0
12 years 9 months ago #23605

Hey, not sure if this is a bug or a tweak i need to make on my store. I need to enter size dimensions for my products which are 2 dimensional posters, so i need a width and a height.

so example dimensions i would enter in the product screen are:

Volume
Length : 0
Width : 55.00 cm
Height : 40.00

when i view my product the dimensions are listed like so:

Width: 55 cm
Height: 4 cm

If i have a height of 41.00 the product page shows the correct value for height. Hikashop is rounding up or something and removing the zero from the "40" value, even though it is proceeded by ".00". this is also true if i have a multiple of ten for the other dimension fields!

how to fix please??? cheers!

Last edit: 12 years 9 months ago by squeakstar.

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
12 years 9 months ago #23619

That's indeed a bug.
You need to edit the file "show" of the view "product" via the menu Display->Views and change several piece of code (for height, width and lenght) from:
rtrim($this->element->product_width,',.0')

to:
rtrim(rtrim($this->element->product_width,'0'),',.')

and that will work correctly.

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

  • Posts: 51
  • Thank you received: 0
12 years 9 months ago #23620

excellent - that did the trick! Thank you - would never have worked that one out myself ;)

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

  • Posts: 51
  • Thank you received: 0
12 years 7 months ago #26132

Hey, just so you know, since the last update, I've only just noticed like, but this bug has come back. I'm going to remake the suggested mod again after a backup. :)

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
12 years 7 months ago #26133

We didn't do a release since 1 month and a half so it's normal that the problem is still there. It will be corrected in next release.

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

  • Posts: 51
  • Thank you received: 0
12 years 7 months ago #26135

yep that fixed it again. please fix in the next release!!!

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

  • Posts: 51
  • Thank you received: 0
12 years 7 months ago #26177

oh sorry - it seems like a blur away since i did that and had gremlins with something else in the latest release!

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

Time to create page: 0.057 seconds
Powered by Kunena Forum