New Zenner
- Join Date:
- May 2006
- Posts:
- 18
- Plugin Contributions:
- 0
Post #1 by tekfix
Hi
I am just wondering how to change from pounds to grams/kilograms because im am located in Australia?
Tekfix Computing Solutions
http://www.tekfix.com.au/
Started by tekfix on 12 May 2006, 6:37 AM · Views: 33,884
New Zenner
Hi
I am just wondering how to change from pounds to grams/kilograms because im am located in Australia?
Tekfix Computing Solutions
http://www.tekfix.com.au/
Totally Zenned
Have you tried the Search facility?
The way to check is to go to admin>tools>developers toolkit and type in "lb" at the bottom left field and then select all catalog/admin files. Then edit the files and stick them in your override directories.
And yes, one day, this probably will be switchable in admin!
Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !
New Zenner
Hi thanks Ryk,
I have changed it to KGs,
to change it u need to modify these files:
**/admin/includes/languages/english.php **
Line #570 : define('TEXT_PRODUCT_WEIGHT_UNIT','lbs');
**/includes/languages/english.php **
Line #376 : define('TEXT_PRODUCT_WEIGHT_UNIT','lbs');
Line #379 : define('TEXT_SHIPPING_WEIGHT','lbs');
/**includes/languages/english/modules/shipping/zones.php **
Line #25 : define('MODULE_SHIPPING_ZONES_TEXT_UNITS', 'lb(s)');
Thanks for the Help
Tekfix Computing Solutions
http://www.tekfix.com.au/
Totally Zenned
tekfix:
to change it u need to modify these files ...
Spot on. Apart from in the USPS shipping module (which implicitly assumes lbs) weight is just a label for display, though if you use a different scale you may also want to check the "maximum package weight you will ship" variable in the Admin > configuration > shipping/packaging menu (especially if you swicth to grams!)
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
New Zenner
Thank you so much for that, has made my life so much easier :)
vegan nut free eco friendly skin care
skinessence australia
New Zenner
tekfix:
Hi thanks Ryk,
I have changed it to KGs,
to change it u need to modify these files:**/admin/includes/languages/english.php **
Line #570 : define('TEXT_PRODUCT_WEIGHT_UNIT','lbs');**/includes/languages/english.php **
Line #376 : define('TEXT_PRODUCT_WEIGHT_UNIT','lbs');
Line #379 : define('TEXT_SHIPPING_WEIGHT','lbs');/**includes/languages/english/modules/shipping/zones.php **
Line #25 : define('MODULE_SHIPPING_ZONES_TEXT_UNITS', 'lb(s)');Thanks for the Help
May i ask to what version of Zen Cart does this apply to as the line numbers dont add up to my Version 1.3.7
Paul
New Zenner
It does not matter what the line numbers are, just look for the same code.
Im stunned that ZenCart only include lbs. The US is NOT the only country in the world!
Considering the ease of use over other carts, you would think it would be just common sense to put an option in the config settings where you can select KGs. So so so logical to do this! Grhhhh.....
Totally Zenned
Actually Zen Cart is way ahead of most carts on this point. Instead of simplistically building a switch into the Admin to offer the standard lbs, kg and g, it allows you to use any weight units you like. So if you wanted to offer units in tonnes or milligrams or carats or Zogian rogulles, you can.
And moreover, if you want to describe your everyday kilograms as kg in one language but kilo to a visitor in a different language - you can do that too.
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
Inactive
if you change those three files that works great. Tho, only 2 seem to be in custom folders. will they not be overwritten when we upgrade?
New Zenner
ZC 1.3.7 :)
/admin/includes/languages/english.php
Line #569 : define('TEXT_PRODUCT_WEIGHT_UNIT','lbs');
/includes/languages/english.php
Line #392 : define('TEXT_PRODUCT_WEIGHT_UNIT','lbs');
Line #395 : define('TEXT_SHIPPING_WEIGHT','lbs');
/includes/languages/english/modules/shipping/zones.php
Line #25 : define('MODULE_SHIPPING_ZONES_TEXT_UNITS', 'lb(s)');
Well this is what I found in my cart anyway.
I have installed ZC 1.3.7 with the following additional modules.
IH2.0
MySQL database backup
stock with attributes 4.5
AustPost Improved.
Hope this helps someone else.
DAVE
:)
Totally Zenned
When making the changes outlined by Dave above, remember to edit copies of the files which you have placed in:
/includes/languages/YOUR_TEMPLATE_NAME/english.php and /includes/languages/english/modules/shipping/YOUR_TEMPLATE_NAME/zones.php
(the admin change will need to go in the file quoted as the over-ride system does not yet extend to the Admin)
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
New Zenner
Thanks for pointing out the bits that I forgot to mention Kuroi, and thanks be to Dr Byte for editing my post to remove the bits that I didn't really mean to paste in.
:)
Cheers all,
DAVE
New Zenner
Great thread...works well...I was able to change mine from lbs to kgs very easily although on the shipping estimator, it still says lbs....any idea where to change that file??
New Zenner
Also, under Admin, Configuration, Shipping / Packaging, Package Tare - it still shows lb and lbs.
Not serious because the customer doesn't see it but would be nice to fix.
Anyone know where?
Thanks, Steve.
New Zenner
We have a website that has a default in lbs and this is naturally used for shipping, but we buy from a supplier who advertises the product in kilo's so we do have to make a change - wish we didnt. Fingers crossed for a dual weight cart, well we can live in hope
We dont just talk about it - we do it !!!!
OAKWOOD EVENTS
Deceased
oakwoodevents:
Fingers crossed for a dual weight cart, well we can live in hope
Please don't hold your breath while waiting. It'll probably never happen.
The fact is, zencart doesn't really weigh in lbs or kgs. It simply accepts 'numbers'. These numbers could mean anything, ounces, grams, kilo, pounds, even tonnes.
Wherever you see an 'identifer' such as "lbs", or "kgs" in relation to these 'numbers' it is important to realise that what you are seeing is nothing more than a simple text string.
With this in mind it should be easy to realise why there'll probably never a 'dual weight' option ('cos unless the developers incorporate code to cater for every possible weight conversion there will always be someone that wants a conversion that they didn't account for). IOW, by keeping it as simple as it stands, the weight can be adapted to any standard or format that the store owner requires. The moment the developers specify a particular weight format (for conversion purposes) they'll have immediately broken it for anyone that uses anything other than their specifed format(s).
If YOU were a developer, would you want to do that?
Cheers
Rod.
New Zenner
I dunno RodG -- if it's only a text entry, there's no worries about actual weight. Wouldn't it be simple to just provide some drop-downs that change the text?
John
Totally Zenned
johnwey:
I dunno RodG -- if it's only a text entry, there's no worries about actual weight. Wouldn't it be simple to just provide some drop-downs that change the text?There are worries about actual weight. It's used in a number of places in the cart, in particular for shipping, but also for attribute pricing. As long as you are consistent and use the same units throughout, then it doesn't matter which units they are. If you start mixing units, then it would be a nightmare.
You're right that the ability to define the units differently would be helpful, maybe as a configuration value set in the Admin. However, the place that this would happen naturally (Admin > Configuration), does not currently support multilingual entries. So the location of this text in the language files is, at present, the best option.
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
Deceased
johnwey:
I dunno RodG -- if it's only a text entry, there's no worries about actual weight. Wouldn't it be simple to just provide some drop-downs that change the text?
John
If everyone spoke English, yes. But just as with the other textual stuff, it is easier all around to let the end user edit them via the language files if and when required.
Most users edit these files as a matter of course when setting up and customising their stores anyway, so where's the hardship in changing the default 'lbs' to 'kgs' at the same time?
It isn't like an admin is going to need need to change this after the store is operational, so adding another dropdown menu seems a bit superflious to me.
Cheers
Rod
New Zenner
I'm in Australia, using 1.3.8 version. I've upgraded my AustPost thanks to Rod's help. Now have changed my lbs to grams.
Here's the current problem:
I've gone through and changed all the lbs to grams (using the developers tool kit I found them all eventually) and on the Austpost module also changed from Kgs to grams that I'm using. In testing it, the items in the shopping cart add correctly to 44grams but on the checkout the postage is calculating it way to much, I'm wondering what I've missed. Any ideas?
Ooooh I'm now thinking I should have made everying kgs and worked out every thing based on a 0.0kg...
I'll try that while I'm waiting to see if there was anything else.
Tell staff why this post should be reviewed.