How do I change the unit of measure for weight in Zen Cart?


The product information page in Zen Cart can be set to display the product weight.  By default the unit of measure is ‘labelled’ as lbs.  The reason I say ‘labelled’ as the unit of measure is only a label used and is set in a couple of language defines.

 

The shopping cart page can also be set to display the product and/or order weight.

To change the unit of measure for weight in Zen Cart:

  1. Open the english.php file located in the /includes/languages/ directory.
  2. Find this section of code:
    define('TEXT_PRODUCT_WEIGHT_UNIT','<strong>lbs</strong>');
  3. and modify the define statement to required unit (for example, grams or kgs):
    define('TEXT_PRODUCT_WEIGHT_UNIT','<strong>kg</strong>');
  4. Also, find this section of code:
    define('TEXT_SHIPPING_WEIGHT','<strong>lbs</strong>');
  5. and modify to match the units used above for Product Weight Unit:
    define('TEXT_SHIPPING_WEIGHT','<strong>kg</strong>');

     

    ** Be sure to keep the single quote marks in your new define statements.

  6. Save the modified english.php file to your override folder.  This will be /includes/languages/CUSTOM/ where CUSTOM represents the name of your current template folder.
     
   
     

  1. No comments yet.
(will not be published)

Notify me of followup comments via e-mail. You can also subscribe without commenting.