Welcome, Guest. Please login or register.
Login with username, password and session length


Need help or want to talk to other developers? Join the VirtueMart Chat! Read more...

  Advanced search

247031 Posts in 67504 Topics- by 258313 Members - Latest Member: Matej.iStraxx
Pages: [1]   Go Down
Print
Author Topic: Changing inches to centimetres, pounds to kilograms  (Read 65787 times)
cccmikey
Guest
« on: March 11, 2006, 14:44:36 pm »

G'day Smiley

I can't seem to find where I can change the default unit of measures to kg and centimetres. I can't find it in the db, and my cPanel host doesn't let me search file contents so I'm not sure where it's hidden in the code in the current virtuemart install.

Cheers, Mike
Logged
moonstone
Newbie
*
Posts: 1


« Reply #1 on: July 21, 2006, 08:24:06 am »

I was having the same problem and did a text seach for "inches" in Joomla folder and got this from \administrator\components\com_virtuemart\CHANGELOG.php:

Quote
^ Now is possible set default product weight unit (pounds) and default product length unit (inches) in language file:
  var $_PHPSHOP_PRODUCT_FORM_WEIGHT_UOM and var $_PHPSHOP_PRODUCT_FORM_LENGTH_UOM

I proceeded to change \administrator\components\com_virtuemart\languages\english.php around lines 328 - 329:

Quote
        var $_PHPSHOP_PRODUCT_FORM_WEIGHT_UOM_DEFAULT = 'pounds';
        var $_PHPSHOP_PRODUCT_FORM_DIMENSION_UOM_DEFAULT = 'inches';

change to:

Quote
        var $_PHPSHOP_PRODUCT_FORM_WEIGHT_UOM_DEFAULT = 'kg';
        var $_PHPSHOP_PRODUCT_FORM_DIMENSION_UOM_DEFAULT = 'cm';

That's it! Hope that works for you too...  Wink
« Last Edit: July 21, 2006, 08:40:26 am by moonstone » Logged
Asoka
Newbie
*
Posts: 2


« Reply #2 on: April 01, 2009, 12:53:52 pm »

I use version 1.1.3
file located in
\administrator\components\com_virtuemart\languages\product\english.php

for your reference.
Logged
weatherfront
Newbie
*
Posts: 20


WWW
« Reply #3 on: April 07, 2009, 16:14:48 pm »

Surely this just changes the text you see for each product but not the units and therefore any calculations.

Admitedly the calcs don't cause a problem uless / until perhaps volumetric weight is introduced and someone uses the inches dim to get cubic feet!

There must be somewhere to tell the code that in the UK we use metric dims and not imperial.
Logged

Environmental Monitoring @ www.enviromonitors.co.uk
warfie
Newbie
*
Posts: 18


« Reply #4 on: June 30, 2009, 08:01:51 am »

Worked for me. Cheers, moonstone!
Logged
madscotsman
Full Member
***
Posts: 109



WWW
« Reply #5 on: August 01, 2009, 18:18:41 pm »

I changed the units of measurement in the english.php file under administrator/components/virturemart/languages/products/

It seems to work ok when I create a new product, but I have a CSVI file created from CSV Improved with a Joomla V1.0 and VM 1.0.13. When I import the CSVI file, into my Joomla V 1.5.11 and VM 1.1.3 test site, all the products imported are in inches and pounds.

Any suggestions for this one?
Logged
miguelgarcia
Newbie
*
Posts: 14

Web Design Portugal - Miguel Garcia


WWW
« Reply #6 on: November 13, 2009, 19:13:49 pm »

Hello to all ...

If you are using CSV Improved, at least on version 0.9 (legacy mode), there are fields which permit you to define products units of measurement for weight and for its dimensions.

If you are using a more recent version of CSVi it has those fields too .

They are:

product_weight_uom (uom = units of measurement), for ex. grams

and

product_lwh_uom  (lwh = length, width and height), for ex. milimeters


So, if you include on your spreadsheet a column with product_weight_uom and other with product_lwh_uom you have your problem solved.


Miguel Garcia


Logged

Pages: [1]   Go Up
Print
Jump to: