dot behind the product volume

  • Posts: 95
  • Thank you received: 1
12 years 4 months ago #57277

Hello,

how can I remove the dot after the number showing product length, width, height, weight? When there is whole number it shows dot behind the number.
It should be:
Length: 250 cm

but it shows:
Length: 250. cm

Thanks
Vaclav

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

  • Posts: 13201
  • Thank you received: 2322
12 years 4 months ago #57330

Hi vaclav,

To remove this dot, edit the view "product / show_block_dimension.php" in HikaShop > Display > Views.

And add a dot before '0' in the first rtrim(), like this:

<?php echo JText::_('PRODUCT_WIDTH').': '.rtrim(rtrim($this->element->product_width,',.'),'0').' '.JText::_($this->element->product_dimension_unit); ?><br />
To:
<?php echo JText::_('PRODUCT_WIDTH').': '.rtrim(rtrim($this->element->product_width,',.'),'.0').' '.JText::_($this->element->product_dimension_unit); ?><br />

For each dimensions properties.

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

  • Posts: 95
  • Thank you received: 1
12 years 4 months ago #57387

Hi Xavier,

thanks for your reply.

I did it as you wrote and it didnt work properly - the dot disappeared but last 0 (zero) from the number disappeared to.
When I have 220 or 2200 in the length field filled, it makes both 22 in the product view. So this makes that all the zeros disappear from the end of number.

Any other idea how to remove the dot and keep the number as filled?

Thanks
Vaclav

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

  • Posts: 82820
  • Thank you received: 13366
  • MODERATOR
12 years 4 months ago #57431

Do like that instead:

<?php echo JText::_('PRODUCT_WIDTH').': '.rtrim(rtrim($this->element->product_width,'0'),',.').' '.JText::_($this->element->product_dimension_unit); ?><br />

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

Time to create page: 0.069 seconds
Powered by Kunena Forum