Skip to main content

dot behind the product volume

More
14 years 2 months ago #57277 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

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

More
14 years 2 months ago #57330 by Xavier
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:
Code:
<?php echo JText::_('PRODUCT_WIDTH').': '.rtrim(rtrim($this->element->product_width,',.'),'0').' '.JText::_($this->element->product_dimension_unit); ?><br />
To:
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.

More
14 years 2 months ago #57387 by vaclav
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.

More
14 years 2 months ago #57431 by nicolas
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.216 seconds
Powered by Kunena Forum