Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / changing shipping weight to grams

changing shipping weight to grams

Views: 4,248

Results 1 to 10 of 10
30 Oct 2009, 1:09 PM
#1
lukeciw avatar

lukeciw

New Zenner

Join Date:
Aug 2008
Location:
Hampshire-UK
Posts:
82
Plugin Contributions:
0

changing shipping weight to grams

I am trying to change all the weight values to grams (gr(s))
i have read through the e-start book and followed instructions but when I go into the shop and look at a product it display the weight in 'lb(s)' and i would like to know how to change this value.
:blink::unsure::huh:

30 Oct 2009, 1:12 PM
#2
lukeciw avatar

lukeciw

New Zenner

Join Date:
Aug 2008
Location:
Hampshire-UK
Posts:
82
Plugin Contributions:
0

Re: changing shipping weight to grams

Having followed all instructions in the e-start book, i cant seem to change the product weight to grams, when I go into the store it shows up as 'lb(s)'

please help.

2 Nov 2009, 6:12 AM
#3
canopy avatar

canopy

Totally Zenned

Join Date:
Oct 2006
Posts:
625
Plugin Contributions:
0

Re: changing shipping weight to grams

The instructions in the book for changing the weight has worked well so far so I think it could be something to do with the actual files you've edited.

First, check which template (e.g. magic) is currently active in your store. Next, check that you are making the changes to the correct files in the active template (e.g. magic ) and not some other template.

Finally, do let us what Zen Cart version you are using and whether you have other mods installed.

4 Nov 2009, 9:43 AM
#4
lukeciw avatar

lukeciw

New Zenner

Join Date:
Aug 2008
Location:
Hampshire-UK
Posts:
82
Plugin Contributions:
0

Re: changing shipping weight to grams

i am working on original template at the mo

4 Nov 2009, 9:56 AM
#5
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: changing shipping weight to grams

The TEXT describing the weight units are just LABELS, and do not have any effect on the maths that calculates weights.

If you want to change lb(s) to g

Then you will need to change the language DEFINES for all instances of lb(s)

Use: admin>>>tools>>>Developer Tool Kit to search for all instances of lb(s) in the language.php files.

Call up those files for editing. Find the lb(s) instances, and change them to g

As GKH says... it is not really a good idea to change CORE files. You should be using a CUSTOM template/language system, where your edited language.php files are then stored.

4 Nov 2009, 10:39 AM
#6
lukeciw avatar

lukeciw

New Zenner

Join Date:
Aug 2008
Location:
Hampshire-UK
Posts:
82
Plugin Contributions:
0

Re: changing shipping weight to grams

i am having trouble uploading my new custom template, it doesnt seem to appear, so i am trying to see if i can just change the wording in the original temp.

4 Nov 2009, 1:40 PM
#7
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: changing shipping weight to grams

lukeciw:

i am having trouble uploading my new custom template, it doesnt seem to appear,

If I were you I would get this sorted out first...

If you now start tinkering with the CORE files, you're just putting on "sticking plaster", which masks the fundamental problem.

4 Nov 2009, 3:14 PM
#8
lukeciw avatar

lukeciw

New Zenner

Join Date:
Aug 2008
Location:
Hampshire-UK
Posts:
82
Plugin Contributions:
0

Re: changing shipping weight to grams

i have finally solved the problem:
after creating a new template and then following the suggestions in the book, the lb(s) problem will only change when working on your own template.

:clap:

many thanks to all.

14 Jan 2010, 4:28 AM
#9
rachalmers avatar

rachalmers

New Zenner

Join Date:
Mar 2008
Posts:
55
Plugin Contributions:
0

Re: changing shipping weight to grams

schoolboy:

The TEXT describing the weight units are just LABELS, and do not have any effect on the maths that calculates weights.

If you want to change lb(s) to g

Then you will need to change the language DEFINES for all instances of lb(s)

Use: admin>>>tools>>>Developer Tool Kit to search for all instances of lb(s) in the language.php files.

Call up those files for editing. Find the lb(s) instances, and change them to g

As GKH says... it is not really a good idea to change CORE files. You should be using a CUSTOM template/language system, where your edited language.php files are then stored.

Well now I'm in trouble - because even with my limited math, I know that adding lbs and oz together do not equal kg and gm totals - or weights.

So one item of 250g shows up as 250lb - that's a hell of a postage difference.
I would have thought that this problem would have seen a built in option switch years ago, given that over half the world is metric.

Indeed, if it means I have to spend forever hand coding changes and templates, I am in for a long haul.

14 Jan 2010, 1:57 PM
#10
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: changing shipping weight to grams

rachalmers:

So one item of 250g shows up as 250lb - that's a hell of a postage difference.
I would have thought that this problem would have seen a built in option switch years ago, given that over half the world is metric.

The "problem" has been solved, and the solution is staring you in the face.

zencart doesn't use any weight format. It simply uses numbers. It is up to the end user to determine whether these numbers signify grams, pounds, kilos, tons, tonnes, carets, moon rocks, or whatever. This is done simply by changing the text displayed next to the number.

rachalmers:

Indeed, if it means I have to spend forever hand coding changes and templates, I am in for a long haul.

Why so? As long as any templates, etc, use the same DEFINES then they will show the correct data/info too.

The only time there is any issue and possible conversions needed is when it comes to quoting shipping costs based on weight. The various shipping modules have their own concept of what the weight "numbers" actually mean. The USP modules treat the numbers as lbs, and the ozpost module will treat these same numbers as either grams or kilograms.

All rather simple, but VERY flexible and effective.

Cheers
Rod