Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Changing shipping weight from lb to grams?


sallypointer

Recommended Posts

I'm very new at altering coding, so it may be that I'm just missing something completely obvious. At the moment I'm working solely with the supplied template and default set-ups

 

I'm trying to set up my shipping options based on the weights of products. I can fill in the basic table rates ok, but I have done this based on the weight being in grams. However, when I did a test checkout the text that appears for the customer says the order is 650lbs! Where do I find the bit of text that needs changing to get this to show 650g rather than 650lbs?

Link to comment
Share on other sites

I'm very new at altering coding, so it may be that I'm just missing something completely obvious. At the moment I'm working solely with the supplied template and default set-ups

 

I'm trying to set up my shipping options based on the weights of products. I can fill in the basic table rates ok, but I have done this based on the weight being in grams. However, when I did a test checkout the text that appears for the customer says the order is 650lbs! Where do I find the bit of text that needs changing to get this to show 650g rather than 650lbs?

You are probably better off specifying kg.

 

catalog\includes\languages\english.php (and other language files) look for

 

define('TEXT_WEIGHT_UNIT', 'lbs');

and change to

define('TEXT_WEIGHT_UNIT', 'kgs');

 

I don't remember it being elsewhere.

 

What country are you in?

Link to comment
Share on other sites

You are probably better off specifying kg.

 

catalog\includes\languages\english.php (and other language files) look for

 

define('TEXT_WEIGHT_UNIT', 'lbs');

and change to

define('TEXT_WEIGHT_UNIT', 'kgs');

 

I don't remember it being elsewhere.

 

What country are you in?

 

 

Hmm, I've just been right through that file, several times (and successfully changed one or two other small details-woohoo- I feel quite proud of myself!) but I completely failed to find the weight in there. Is there anywhere else it could be?

Link to comment
Share on other sites

What shipping modules do you have enabled or installed outwith the default ones.

 

A default osCommerce install will have 3 references to lbs for versions prior to release 051113

 

catalog/includes/languages/german/modules/shipping/usps.php

 

catalog/includes/modules/shipping/ups.php

 

catalog/includes/modules/shipping/usps.php

and after release 051113 there will be 2 references.

 

catalog/includes/languages/german/modules/shipping/usps.php

 

catalog/includes/modules/shipping/usps.php

Edited by 241

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Hmm, I've just been right through that file, several times (and successfully changed one or two other small details-woohoo- I feel quite proud of myself!) but I completely failed to find the weight in there. Is there anywhere else it could be?

I am so sorry for wasting your time, I must have an error in that file that has been carried over from a contrib that I installed yonks ago. It was in my test site, not in my shop site.

 

I ended up doing a search for lbs on an unmodified installation, and can only conclude that the unit of weight is only specified in the shipping modules. You will need to look there in the language part to change the unit.

There are other contribs that may put the weight and the unit of weight in other files eg Display Product Weight ...... contrib.

Link to comment
Share on other sites

What shipping modules do you have enabled or installed outwith the default ones.

 

A default osCommerce install will have 3 references to lbs for versions prior to release 051113

and after release 051113 there will be 2 references.

That is what I get when I do a search on lb. Any other references will depend on the shipping modules installed.

Link to comment
Share on other sites

That is what I get when I do a search on lb. Any other references will depend on the shipping modules installed.

The english version of usps.php in includes\languages\english\modules\shipping says

define('MODULE_SHIPPING_USPS_TEXT_DESCRIPTION', 'United States Postal Service<br><br>You will need to have registered an account with USPS at http://www.uspsprioritymail.com/et_regcert.html to use this module<br><br>USPS expects you to use pounds as weight measure for your products.');

 

So a search for lbs will not pick this up.

 

Anyway, I think I need a holiday from OSC after this.

Link to comment
Share on other sites

The english version of usps.php in includes\languages\english\modules\shipping says

 

So a search for lbs will not pick this up.

 

If you read my post closely there is no mention of includes\languages\english\modules\shipping\usps.php

 

It is not always the languages files that hold the text some pieces are hard coded.

 

for example: catalog/includes/modules/shipping/usps.php approx line #91

 

								'module' => $this->title . ' (' . $shipping_num_boxes . ' x ' . $shipping_weight . 'lbs)');

 

 

If we await the original posters respond to my previous post requesting infomation on what modules other than the default modules are installed/enabled this will give the required information to help resolve the issue and save making numerous random postings.

Edited by 241

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

I guess from Sallypointer's other posts we know it's zone rate shipping, so...

 

includes\languages\english\modules\shipping\zones.php(16):

 

define('MODULE_SHIPPING_ZONES_TEXT_UNITS', 'lb(s)');

 

 

Eureka! Thank you so much. I can't tell you how much better it feels to have got one of the things that has been driving me bonkers today fixed!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...