Forums / Built-in Shipping and Payment Modules / changing from lbs to kgs for shipping weight?

changing from lbs to kgs for shipping weight?

Locked

Views: 7,871

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
9 Jun 2006, 12:28 PM
#1
pat_allosaurs avatar

pat_allosaurs

New Zenner

Join Date:
May 2006
Posts:
33
Plugin Contributions:
0

changing from lbs to kgs for shipping weight?

Hello everyone, and I hope someone can help...

I am trying to set up the zone rates in the shipping module, and I was wondering if there was any way of changing how weight is calculated so that it uses grammes/kilogrammes instead of pounds. Any ideas? I've wracked my brains and had a really good look around, but I'm stumped. Hope I'm not being stupid, and cheers in advance!

Pat

9 Jun 2006, 12:52 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: changing from lbs to kgs for shipping weight?

Pat Allosaurs:

Hello everyone, and I hope someone can help...

I am trying to set up the zone rates in the shipping module, and I was wondering if there was any way of changing how weight is calculated so that it uses grammes/kilogrammes instead of pounds. Any ideas? I've wracked my brains and had a really good look around, but I'm stumped. Hope I'm not being stupid, and cheers in advance!

PatApart from in the USPS shipping module, Zen Cart doesn't care whether you use lbs, grams, kilo or zerkuts from the planet Zog. The units displayed are purely cometic. What you do have to do however, is choose between grammes and kilos and be consistent throughout in their usage.

For example, if you enter all your weights in grammes e.g. product X weights 500 and product Y weights 1,000, then enter their weights as 500 and 1,000 respectively or 0.5 and 1. Then when you enter your shipping table set your range to 0-750 (for example) or 0-0.75 as appropriate.

You can change the units actually displayed on the pages by using the Developer's Tool kit in Admin to search for all instanes of "lb" and "lbs" (from memory I think there's 2 of the former and one of the latter)

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

9 Jun 2006, 1:33 PM
#3
pat_allosaurs avatar

pat_allosaurs

New Zenner

Join Date:
May 2006
Posts:
33
Plugin Contributions:
0

Re: changing from lbs to kgs for shipping weight?

Blimey that was fast, I hardly got the chance to boil a kettle!

You can change the units actually displayed on the pages by using the Developer's Tool kit in Admin to search for all instanes of "lb" and "lbs" (from memory I think there's 2 of the former and one of the latter)

I did try the developers toolkit as I suspected it was just a case of changing the units as you describe, but I overcomplicated my search and got no joy...its blooming obvious now you've spelt it all out though. I'm kicking myself. I think I've been staring at my shop for far too long.

Many thanks for your patience (and speed!)

Pat

9 Jun 2006, 2:27 PM
#4
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: changing from lbs to kgs for shipping weight?

Pat Allosaurs:

Blimey that was fast, I hardly got the chance to boil a kettle!

That sounds like a very British English expression...so you may be interested in locating the UK Template :laugh:

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !

9 Jun 2006, 3:01 PM
#5
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: changing from lbs to kgs for shipping weight?

Ryk:

That sounds like a very British English expression...so you may be interested in locating the UK Template :laugh:There's a lot of good in the UK Template, but last time I looked one big bad that outweighed them, i.e. that it once installed the user is left with a new template that leads them down the "classic" path.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

9 Jun 2006, 3:25 PM
#6
pat_allosaurs avatar

pat_allosaurs

New Zenner

Join Date:
May 2006
Posts:
33
Plugin Contributions:
0

Re: changing from lbs to kgs for shipping weight?

What I did was take the sql patch from the uk template, then I went with the future_zen template for the overall look of my site. Future_zen is very tweakable, I've had lots of fun with it, and the sql patch made the shop UK friendly in an instant. I'm presuming its ok to mix and match like this! Of course I havent fully tested everything but it all seems to work very well together and I'd cautiously recommend the combination to any scared newbie.

9 Jun 2006, 3:36 PM
#7
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: changing from lbs to kgs for shipping weight?

Pat Allosaurs:

What I did was take the sql patch from the uk template, then I went with the future_zen template for the overall look of my site. Future_zen is very tweakable, I've had lots of fun with it, and the sql patch made the shop UK friendly in an instant. I'm presuming its ok to mix and match like this! Of course I havent fully tested everything but it all seems to work very well together and I'd cautiously recommend the combination to any scared newbie.This is easily the most impressive post that I've read today. It's really great to see this sort of initiative from somebody who has not long started using Zen Cart :thumbsup:.

I believe that it is OK to mix and match like this and the SQL patch will have done most of the UK customisation for you. There will still be some odd missing bits that are in the define statements dotted about the place, such as the weight units that kicked off this thread, but they can easily be mopped up as your spot them.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

12 Aug 2006, 4:23 PM
#8
danyal avatar

danyal

New Zenner

Join Date:
Aug 2006
Posts:
1
Plugin Contributions:
0

Re: changing from lbs to kgs for shipping weight?

I'd be careful when doing a generic "find & replace" for the string "lb" and replacing it with "kg".

Amongst other things, people in Lebanon might end up a bit confused. Not that they're probably bothered about your shop right now.

In the end, after downloading the site to Dreamweaver and having a proper look through, I found that changing the following three constants did the trick:

TEXT_PRODUCT_WEIGHT_UNIT in "includes/languages/english.php"
MODULE_SHIPPING_ZONES_TEXT_UNITS in "includes/languages/english/modules/shipping/zones.php"
TEXT_PRODUCT_WEIGHT_UNIT in "admin/includes/languages/english.php"

Cheers, Danny

13 Aug 2006, 6:16 AM
#9
zenartman avatar

zenartman

Zen Follower

Join Date:
Nov 2005
Posts:
134
Plugin Contributions:
0

Re: changing from lbs to kgs for shipping weight?

Wow, that worked GREAT!!! I used to use developer's tool to find lb instances. Then upgraded my site to 1.3.1 and had to change lb to kg again. Got your suggestion above.

Changed just 3 files. Now perfect. Thank you!!! It should be in the FAQ.
I wonder if these 3 changed files be in override files.

13 Aug 2006, 8:44 AM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: changing from lbs to kgs for shipping weight?

zenartman:

I wonder if these 3 changed files be in override files.
The 2 files that are "not" in the admin area should be changed in overrides.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

22 Mar 2007, 11:06 AM
#11
heathenpeddler avatar

heathenpeddler

New Zenner

Join Date:
Jan 2007
Posts:
6
Plugin Contributions:
0

Re: changing from lbs to kgs for shipping weight?

Ryk:

That sounds like a very British English expression...so you may be interested in locating the UK Template :laugh:
I looked for the UK Template in downloads but didn't see it, searched here and didn't find it. Am I going daft or does someone have a link to that sql patch? I don't want the whole template, just the patch :) if it'll help set everything to UK standards

10 Sep 2008, 2:31 PM
#12
justmark avatar

justmark

New Zenner

Join Date:
Aug 2008
Location:
Canada
Posts:
46
Plugin Contributions:
0

Re: changing from lbs to kgs for shipping weight?

Hello!!!

I am really trying to get from lbs to kgs and I followed your steps, but I think that I missed something. My store is in Canada and I got this from the forum:

" 1. Just log into your Admin
2. Click on Modules
3. Click on Shipping
4. Then look for Zone Rates (Zone)
Skip Countries, use a comma separated list of the two character ISO country codes

Zone 1 Countries
CA
Zone 1 Shipping Table
0.030:0.52, 0.050:0.96, 0.100:1.15, 0.200:1.92, 0.500:2.65
Zone 1 Handling Fee
1.00

Zone 2 Countries
US
Zone 2 Shipping Table
0.030:0.96, 0.050:1.15, 0.100:1.92, 0.200:3.20, 0.500:6.40
Zone 2 Handling Fee
1.00

Zone 3 Countries
AT,BE,GB,FR,DE,GL,IS,IE,IT,NO,NL,DK,PL,ES,SE,CH,FI,PT,IL,GR,JP,AU,NZ,SG,TW,CN,HK
Zone 3 Shipping Table
0.030:1.60, 0.050:2.30, 0.100:3.75, 0.200:6.40, 0.500:12.80
Zone 3 Handling Fee
1.00 "

but when I got to your steps and I test it, I got this message:
"The shipping rate cannot be determined at this time"
when I go to checkout.

Can you help me and walk me through the process?
I have products that can be mail by letter and let's say they are 0.005kg.

Thank you and I'm waiting.
Mark

justMARK
**mainMAG.NET** - The place where you get magnetized!
ZenCart 1.3.7.1 - for now...