- Posts: 95
- Thank you received: 1
dot behind the product volume
14 years 2 months ago #57277
by vaclav
dot behind the product volume was created by vaclav
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
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.
14 years 2 months ago #57330
by Xavier
Replied by Xavier on topic Re: dot behind the product volume
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:
To:
For each dimensions properties.
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:
Code:
<?php echo JText::_('PRODUCT_WIDTH').': '.rtrim(rtrim($this->element->product_width,',.'),'0').' '.JText::_($this->element->product_dimension_unit); ?><br />
Code:
<?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.
14 years 2 months ago #57387
by vaclav
Replied by vaclav on topic Re: dot behind the product volume
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
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.
14 years 2 months ago #57431
by nicolas
Replied by nicolas on topic Re: dot behind the product volume
Do like that instead:
<?php echo JText::_('PRODUCT_WIDTH').': '.rtrim(rtrim($this->element->product_width,'0'),',.').' '.JText::_($this->element->product_dimension_unit); ?><br />
<?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.216 seconds