VirtueMart Forum

VirtueMart 2 + 3 => Plugins: Payment, Shipment and others => Topic started by: Web Marketing Vicenza on September 08, 2017, 09:15:37 am

Title: Weight of products
Post by: Web Marketing Vicenza on September 08, 2017, 09:15:37 am
Hello

anybody know why in products I see the weight with 4 decimal numbers? It is possible to change from 4 to 2? Or cancel the number after comma?

I am trying to change the default.php in product detail. Do you know solutions?

Thanks
Title: Re: Weight of products
Post by: Web Marketing Vicenza on September 08, 2017, 09:23:37 am
I think I found the solution:

In that file, I changes the Dimension adn added number_format on:

Code: [Select]
<h4><?php echo JText::_('COM_VIRTUEMART_PRODUCT_DIMENSIONS_AND_WEIGHT'?></h4>
               
                <?php
                
if ($this->product->product_length 0) {
                echo 
'<div>'.JText::_('COM_VIRTUEMART_PRODUCT_LENGTH').': ' .number_format($this->product->product_length2)." ".$this->product->product_lwh_uom.'</div>';
....