Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Weight Conversions: Moving Kgs to Lbs with english.php

Weight Conversions: Moving Kgs to Lbs with english.php

Locked

Views: 1,790

Results 1 to 18 of 18
This thread is locked. New replies are disabled.
26 May 2010, 10:18 PM
#1
youngblood avatar

youngblood

New Zenner

Join Date:
Apr 2010
Posts:
59
Plugin Contributions:
0

Weight Conversions: Moving Kgs to Lbs with english.php

Hello Zen Community,

I've seen a few threads in regards to this question already, so let me state what I know so far about this issue.

Traditionally, to change the text string for weight conversions, one would go to their includes/languages/("templatename")/english.php file.

In my english.php file, My code reads as the following:

define('TEXT_PRODUCT_WEIGHT_UNIT','lbs');

// Shipping
define('TEXT_SHIPPING_WEIGHT','lbs');
define('TEXT_SHIPPING_BOXES', 'Boxes');

From what I understand, that's the correct file and line to edit to move my conversions from Kgs to Lbs.

Yet, Zen Cart's shipping modules as well as the weight for each item on the site still shows in kilograms.

What do I need to do to facilitate this transition further? The site is http://www.primevapor.com .

Thanks for your time and patience!

Sincerely,

Jonah Youngblood

26 May 2010, 10:27 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

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

Re: Weight Conversions: Moving Kgs to Lbs with english.php

Yes these are all labels in DEFINE statements, so you just need to find them in the language files. Use the DEVELOPER TOOLKIT in admin >>> tools.

Search for JUST the string you are looking for. And remember, you change only the define text between the two inverted commas... not the UPPER_CASE_CONSTANTS

26 May 2010, 10:30 PM
#3
schoolboy avatar

schoolboy

Totally Zenned

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

Re: Weight Conversions: Moving Kgs to Lbs with english.php

and oh... You need to make sure you are editing the CORRECT file... If you are using a custom template, then the language file is likely to reside there, and NOT in the core path.

so...

/languages/english.php

... may already have an override in:

/languages/YOUR_TEMPLATE/english.php

26 May 2010, 10:52 PM
#4
youngblood avatar

youngblood

New Zenner

Join Date:
Apr 2010
Posts:
59
Plugin Contributions:
0

Re: Weight Conversions: Moving Kgs to Lbs with english.php

Thanks for your reply schoolboy.

What you've stated is exactly what I found in the other threads related to this topic, but it does not work for me. I only have one primary english file. The other templates I've installed use the default english.php. So I'm fairly certain I have the right file. I've also changed the appropriate fields...and I used Dreamweaver the first time and tried it a second with the DEVELOPERS TOOL KIT. Each failed.

Any other ideas?

26 May 2010, 10:54 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: Weight Conversions: Moving Kgs to Lbs with english.php

Zen Cart doesn't deal with weight units in any way other than to display the units that you've defined. It's just text.

So, either you're editing the wrong files or you're using an addon that does things different from the way Zen Cart operates out-of-the-box.

26 May 2010, 11:17 PM
#6
youngblood avatar

youngblood

New Zenner

Join Date:
Apr 2010
Posts:
59
Plugin Contributions:
0

Re: Weight Conversions: Moving Kgs to Lbs with english.php

Thanks Dr. Byte,

Rgr that, Zen Cart alone just reads numbers and not the actual unit of measurement. However, my USPS module does read these items as Kilograms and its hiking up the cost of shipping rates as a result.

That is telling me that somewhere, something is reading this unit as a Kilogram and not a static number.

I'm using the default USPS module that comes with ZenCart...

Any other suggestions or is this tree tapped out?

26 May 2010, 11:22 PM
#7
drbyte avatar

drbyte

Sensei

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

Re: Weight Conversions: Moving Kgs to Lbs with english.php

So this is really a USPS question?

26 May 2010, 11:27 PM
#8
youngblood avatar

youngblood

New Zenner

Join Date:
Apr 2010
Posts:
59
Plugin Contributions:
0

Re: Weight Conversions: Moving Kgs to Lbs with english.php

It could be both, its why I asked in the first place.

For some reason, my site isn't updating file changes from these few lines on english.php

I've thoroughly gone over all other files in related directories and I cannot locate any other (english.php), nor can my Developer Tools on Zen.

Its just as likely to be a Zen problem as it is USPS...so any and all would help.

26 May 2010, 11:34 PM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Weight Conversions: Moving Kgs to Lbs with english.php

The Weight you enter is assumed by USPS and UPS to be pounds ... there are no conversions for this from kg to pounds ...

Unless you write your own converter ... if you enter in 3 on the weight, then that is 3lbs ...

Also note there are Shipping/Packaging settings and Maximum Weight is in pounds ... The Tare Rates calculate pounds ...

You can change the text from lbs to kgs but it is just text ...

26 May 2010, 11:37 PM
#10
youngblood avatar

youngblood

New Zenner

Join Date:
Apr 2010
Posts:
59
Plugin Contributions:
0

Re: Weight Conversions: Moving Kgs to Lbs with english.php

Thanks Ajeh, let me look into your suggestions and I'll reply back as soon as there's something new to report.

Jonah

26 May 2010, 11:42 PM
#11
youngblood avatar

youngblood

New Zenner

Join Date:
Apr 2010
Posts:
59
Plugin Contributions:
0

Re: Weight Conversions: Moving Kgs to Lbs with english.php

Question, How did this setting get to kilograms in the first place?

I haven't installed any addons that would have effected anything like this.

I don't even remember changing it to kgs....ever! From my memory, I think it appeared this way defautly when Zen came online.

All of the options in the admin panel look normal. Nor do I see anything that could relate to this kgs unit.

I realize Zen Cart's software doesn't tally any measurable units, but apparently this USPS module is reading it somewhere, because it still showing very bloated pricing for shipping things under 0.2 pounds....because they're being red as .2 Kgs

26 May 2010, 11:45 PM
#12
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Weight Conversions: Moving Kgs to Lbs with english.php

Zen Cart is released in pounds ... perhaps an add on or something?

27 May 2010, 12:05 AM
#14
youngblood avatar

youngblood

New Zenner

Join Date:
Apr 2010
Posts:
59
Plugin Contributions:
0

Re: Weight Conversions: Moving Kgs to Lbs with english.php

No, Tare weights don't have any bearing on what I'm trying to fix here.

My items are being weighed in kgs when all apparent setting are set to lbs.

No, an addon isn't the culprit either because I didn't install any shipping or billing addons that would have effected the measurements to kgs, which Zen Cart isn't suppose to measure anyway.

The files in my USPS module are DEFAULT and they to have no weight prefix to fill out accordingly.

I know I know, this guys a nut, he must be missing something...well, I'm starting to think the same thing, but I can't find any other english file that would be supporting this rate.

Does anyone know of a program that has a dev tool feature built into that might allow me to view what definitions this kgs display is getting its data from? Then perhaps I could narrow down the appropriate file. Chrome has some decent dev tools, but their not precise enough to find the file I need.

Thanks again for your time and patience...

Jonah

27 May 2010, 12:19 AM
#15
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Weight Conversions: Moving Kgs to Lbs with english.php

Did you try going to the Tools ... Developers Tool Kit ... and in the bottom input box type:
kg
kgs

and see what comes up?

27 May 2010, 12:29 AM
#16
youngblood avatar

youngblood

New Zenner

Join Date:
Apr 2010
Posts:
59
Plugin Contributions:
0

Re: Weight Conversions: Moving Kgs to Lbs with english.php

Ajeh,

Your the man!

I'll keep that bottom input field in mind from now on...I had no idea how handy that little guy was.

Perhaps the guy before me that worked on this had done an addon. This file that was effecting the kgs to lbs was found in the following directory:

/includes/extra_configures/shipping_units.php

Line #2 : define('TEXT_PRODUCT_WEIGHT_UNIT','kgs');

Line #3 : define('TEXT_SHIPPING_WEIGHT','kgs');

Line #5 : define('SYSTEM_WEIGHT_UNITS','kgs'); //(options: 'kgs' or 'lbs')

This is what was skewing my USPS module as well, so thanks again to everyone that contributed...and a big sloppy kiss to Ajeh,

Thanks!

Jonah

27 May 2010, 12:32 AM
#17
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Weight Conversions: Moving Kgs to Lbs with english.php

That is where a lot of add ons and custom configurations go as it is auto loading ... thanks for the update that this helped you out ... :smile:

16 Jul 2010, 3:21 PM
#18
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Weight Conversions: Moving Kgs to Lbs with english.php

Yeah, that's from the Fedex module. Thanks!