News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

how do I change weight units from KG to grammes

Started by Tirrawarra, June 07, 2013, 11:08:40 AM

Previous topic - Next topic

Tirrawarra

Hi,

Ive imported a VM1.1 site to VM 2 and all the products error at shipping - that they are now too heavy.
a product that was 500g is now 500kg

how do I change the default weight UNIT from  KG to g (or grammes) 

eg: what file do I edit?

thanks in advance

Steve

inthysite

Same issue here.  I had the default weight unit set to lbs, but when I imported over 200 products they now show up as kg.  I used CSV Improved if that makes any difference.  I need to somehow change the weight unit on each product back to lbs and I really don't want to do that manually.

AH

for new products go to admin configuration

shopfront tab

Default Weight Unit

and possibly Default LWH Unit if you need to

As for the weight unit on existing products, that is stored on the product table in field

product_weight_uom

change it en-mass using phpmyadmin

sql code

update [i]NNN[/i]_virtuemart_products set product_weight_uom = "G"

or

update [i]NNN[/i]_virtuemart_products set product_weight_uom = "LB"



Weight unit codes jsut in case you want them from shopfunctions.php

   'KG' => JText::_ ('COM_VIRTUEMART_UNIT_NAME_KG')
, 'G'   => JText::_ ('COM_VIRTUEMART_UNIT_NAME_G')
, 'MG'   => JText::_ ('COM_VIRTUEMART_UNIT_NAME_MG')
, 'LB'   => JText::_ ('COM_VIRTUEMART_UNIT_NAME_LB')
, 'OZ'   => JText::_ ('COM_VIRTUEMART_UNIT_NAME_ONCE')



Regards
A

Joomla 4.4.5
php 8.1