Author Topic: Weight of products  (Read 95 times)

Web Marketing Vicenza

  • Beginner
  • *
  • Posts: 15
  • Evisole Studio Associato
    • Web Marketing Vicenza
Weight of products
« 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
Agenzia di Web Marketing Vicenza specializzata in marketing digitale per aziende: Evisole Studio Associato

Web Marketing Vicenza

  • Beginner
  • *
  • Posts: 15
  • Evisole Studio Associato
    • Web Marketing Vicenza
Re: Weight of products
« Reply #1 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>';
....
Agenzia di Web Marketing Vicenza specializzata in marketing digitale per aziende: Evisole Studio Associato