Forums / Built-in Shipping and Payment Modules / Change Shipping Method TEXT Wording

Change Shipping Method TEXT Wording

Views: 9,670

Results 1 to 20 of 23
7 Mar 2013, 9:25 PM
#1
lidlchris avatar

lidlchris

Zen Follower

Join Date:
Feb 2013
Posts:
345
Plugin Contributions:
0

Change Shipping Method TEXT Wording

how do i change the text of a shipping method that shows up to the site visitor.

for example, if i allow a shipping method of USPS Express Mail Int in the admin section but want a different text to show to the site visitor - e.g. 'USPS Express' - where do i go to change ONLY the wording that the end user sees.

7 Mar 2013, 9:50 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

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

Re: Change Shipping Method TEXT Wording

Every shipping module has TWO files:

  1. a MODULE file.
  2. a LANGUAGE file.

You need to go into your file system and edit the LANGUAGE files associated with the shipping modules you are using.

BOTH files will have the SAME NAME - but one is a MODULE file and the other is a LANGUAGE file.

If you want to edit the language file, then it should be done as an OVER-RIDE, where the core file is COPIED, and the copy is edited and saved in your CUSTOM folder for your template - in the languages area of your files.

There are tutorials describing how this is done.

20 years a Zencart User

7 Mar 2013, 10:01 PM
#3
lidlchris avatar

lidlchris

Zen Follower

Join Date:
Feb 2013
Posts:
345
Plugin Contributions:
0

Re: Change Shipping Method TEXT Wording

schoolboy:

Every shipping module has TWO files:

  1. a MODULE file.
  2. a LANGUAGE file.

You need to go into your file system and edit the LANGUAGE files associated with the shipping modules you are using.

BOTH files will have the SAME NAME - but one is a MODULE file and the other is a LANGUAGE file.

If you want to edit the language file, then it should be done as an OVER-RIDE, where the core file is COPIED, and the copy is edited and saved in your CUSTOM folder for your template - in the languages area of your files.

There are tutorials describing how this is done.

are you sure about that?? i'm assuming you mean the includes/languages/english/TEMPLATE_NAME/ folder?? i've already looked there and can't find where to change the text of a shipping method.. i DID see an entry in the configuration table with the different shipping methods but after trying to change it, it did nothing to the text that the user sees.. the only other place i found the shipping methods spelled out is in includes/modules/shipping/usps.php but i don't understand what that module is doing or if i can change anything there.. here is a bit of code there:

$this->intl_types = array(
'Global Express' => 'Global Express Guaranteed (GXG)', // ID="4"
'Global Express Non-Doc Rect' => 'Global Express Guaranteed Non-Document Rectangular', // ID="6"
'Global Express Non-Doc Non-Rect' => 'Global Express Guaranteed Non-Document Non-Rectangular', // ID="7"
'USPS GXG Envelopes' => 'USPS GXG Envelopes
', // ID="12"

7 Mar 2013, 10:03 PM
#4
lidlchris avatar

lidlchris

Zen Follower

Join Date:
Feb 2013
Posts:
345
Plugin Contributions:
0

Re: Change Shipping Method TEXT Wording

maybe if you pointed me to the path of the folders?? or the file name?? i have researched this for hours and can't find an answer.. i'm not 'totally zenned' but have been doing programming for 30 years so i can find my way around usually..

7 Mar 2013, 10:14 PM
#5
schoolboy avatar

schoolboy

Totally Zenned

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

Re: Change Shipping Method TEXT Wording

try:

/includes/languages/english/modules/shipping/usps.php

Inside that folder: (/includes/languages/english/modules/shipping/) you may see a classic folder too. (/includes/languages/english/modules/shipping/classic/).

That means it has OVER-RIDE capacity, so you would create a folder in there at the same level as classic, named after YOUR-TEMPLATE.

/includes/languages/english/modules/shipping/YOUR-TEMPLATE/

And after you edit the language file, it goes into that folder...

/includes/languages/english/modules/shipping/YOUR-TEMPLATE/usps.php

20 years a Zencart User

7 Mar 2013, 10:17 PM
#6
schoolboy avatar

schoolboy

Totally Zenned

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

Re: Change Shipping Method TEXT Wording

lidlchris:

i have researched this for hours and can't find an answer..

This can be reduced to minutes if you use the DEVELOPER TOOL KIT file finder...

ADMIN CONSOLE>>> TOOLS >>> DEVELOPER TOOL KIT.

Here you have several options to search for strings of "text" in php files. Where the search string is found, the results will show the file name and location (path) and the lines involved.

Be careful when editing... as you know, php is very unforgiving...

20 years a Zencart User

7 Mar 2013, 10:23 PM
#7
lidlchris avatar

lidlchris

Zen Follower

Join Date:
Feb 2013
Posts:
345
Plugin Contributions:
0

Re: Change Shipping Method TEXT Wording

schoolboy:

This can be reduced to minutes if you use the DEVELOPER TOOL KIT file finder...

ADMIN >>> TOOLS >>> DEVELOPER TOOL KIT.

Here you have several options to search for strings of "text" in php files. Where the search string is found, the results will show the file name and location (path) and the lines involved.

Be careful when editing... as you know, php is very unforgiving...

hmmmmm.. of course i tried this first but nothing comes up.. maybe you're not understanding me?? try it yourself for any USPS shipping method - e.g. Global Express Non-Doc Rect - it is NOT defined in any file except includes/modules/shipping/usps.php (i posted some of the code above) - and i don't think you change the text there as i've already tried it and the shipping method stops working.. and YES i know about how to over-ride but the text just doesn't exist..

7 Mar 2013, 10:56 PM
#9
lidlchris avatar

lidlchris

Zen Follower

Join Date:
Feb 2013
Posts:
345
Plugin Contributions:
0

Re: Change Shipping Method TEXT Wording

schoolboy:

There should be a language file.

Go here to start with:
http://www.zen-cart.com/showthread.php?205250-USPS-RateV3-January-27-2013&p=1181181#post1181181

Then here:
http://www.zen-cart.com/downloads.php?do=file&id=1292

guess i'll just have to assume you aren't understanding me.. you sent me links to install the USPS module and how to set it up.. since i have had it set up for a long time and it's working correctly, not sure why you sent me those links.. and no, there is NO language file except for includes/languages/english/modules/shipping/usps.php - and there is no where in that file so change text for the USPS international shipping options.

7 Mar 2013, 10:59 PM
#10
schoolboy avatar

schoolboy

Totally Zenned

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

Re: Change Shipping Method TEXT Wording

Here's an idea...

Download that module and unzip it.

Send only the LANGUAGE file to the LANGUAGE ROOT location, and a copy to your LANGUAGE OVERRIDE location (I described these paths above).

See if that makes a difference...

20 years a Zencart User

7 Mar 2013, 11:03 PM
#11
schoolboy avatar

schoolboy

Totally Zenned

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

Re: Change Shipping Method TEXT Wording

lidlchris:

guess i'll just have to assume you aren't understanding me.. you sent me links to install the USPS module and how to set it up.. since i have had it set up for a long time and it's working correctly, not sure why you sent me those links.. and no, there is NO language file except for includes/languages/english/modules/shipping/usps.php - and there is no where in that file so change text for the USPS international shipping options.

AH.. SO you DO have a language file...

DONT do what I said above...

20 years a Zencart User

7 Mar 2013, 11:08 PM
#12
schoolboy avatar

schoolboy

Totally Zenned

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

Re: Change Shipping Method TEXT Wording

Possible that these parameters are called in from USPS server ??

20 years a Zencart User

7 Mar 2013, 11:25 PM
#13
lidlchris avatar

lidlchris

Zen Follower

Join Date:
Feb 2013
Posts:
345
Plugin Contributions:
0

Re: Change Shipping Method TEXT Wording

schoolboy:

Here's an idea...

Download that module and unzip it.

Send only the LANGUAGE file to the LANGUAGE ROOT location, and a copy to your LANGUAGE OVERRIDE location (I described these paths above).

See if that makes a difference...

nope, it's the exact same file i have installed.. and there is nothing in this 'language' file for USPS international shipping methods.. i'll attach all of the code below - tell me if you see any International Shipping Methods that i could change the text for.

<?php /** * @package languageDefines * @copyright Copyright 2003-2013 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: usps.php 18348G 2013-01-27 01:27:00Z ajeh $ */ define('MODULE_SHIPPING_USPS_TEXT_TITLE', 'United States Postal Service'); define('MODULE_SHIPPING_USPS_TEXT_DESCRIPTION', 'United States Postal Service<br /><br />You will need to have registered a Web Tools account with USPS at <a href="http://www.usps.com/webtools/" target="_blank">their website</a> to use this module.<br /><br />USPS expects you to <strong>use pounds as weight measure</strong> for your products.' . ((MODULE_SHIPPING_USPS_USERID == 'NONE' || MODULE_SHIPPING_USPS_USERID == '' || MODULE_SHIPPING_USPS_SERVER == 'test') ? '<br /><br /><strong>Creating a customer account for USPS realtime shipping quotes</strong><br /> 1. <a href="https://secure.shippingapis.com/registration/" target="_blank">Create a USPS Web Tools account</a><br /> 2. Fill in your customer information details and click Submit<br /> 3. You will receive an email containing your USPS rate-quote Web Tools User ID<br /> 4. Insert the Web Tools User ID in the Zen Cart USPS shipping module.<br /> 5. Telephone USPS 1-800-344-7779 and ask them to move your account to the Production Server or email them at [email protected], quoting your Web Tools User ID.<br /> 6. They will send another confirmation email. Set the Zen Cart module into Production mode (instead of Test mode) to finish activation.': '')); define('MODULE_SHIPPING_USPS_TEXT_OPT_PP', 'Parcel Post'); define('MODULE_SHIPPING_USPS_TEXT_OPT_PM', 'Priority Mail'); define('MODULE_SHIPPING_USPS_TEXT_OPT_EX', 'Express Mail'); define('MODULE_SHIPPING_USPS_TEXT_ERROR', 'We are unable to find a USPS shipping quote suitable for your mailing address and the shipping methods we typically use.<br />If you prefer to use USPS as your shipping method, please contact us for assistance.<br />(Please check that your Zip Code is entered correctly.)'); define('MODULE_SHIPPING_USPS_TEXT_SERVER_ERROR', 'An error occurred in obtaining USPS shipping quotes.<br />If you prefer to use USPS as your shipping method, please contact the store owner.'); define('MODULE_SHIPPING_USPS_TEXT_DAY', 'day'); define('MODULE_SHIPPING_USPS_TEXT_DAYS', 'days'); define('MODULE_SHIPPING_USPS_TEXT_WEEKS', 'weeks'); define('MODULE_SHIPPING_USPS_TEXT_TEST_MODE_NOTICE', '<br /><span class="alert">Your account is in TEST MODE. Do not expect to see usable rate quotes until your USPS account is moved to the production server (1-800-344-7779) and you have set the module to production mode in Zen Cart admin.</span>');
7 Mar 2013, 11:26 PM
#14
lidlchris avatar

lidlchris

Zen Follower

Join Date:
Feb 2013
Posts:
345
Plugin Contributions:
0

Re: Change Shipping Method TEXT Wording

schoolboy:

Possible that these parameters are called in from USPS server ??

that's what i think might be happening.. but there should be a way to edit/change/override the text that displays to the end user..

7 Mar 2013, 11:26 PM
#15
lidlchris avatar

lidlchris

Zen Follower

Join Date:
Feb 2013
Posts:
345
Plugin Contributions:
0

Re: Change Shipping Method TEXT Wording

schoolboy:

AH.. SO you DO have a language file...

DONT do what I said above...

yes but the language file has nothing it related to international shipping methods..

8 Mar 2013, 8:08 AM
#16
schoolboy avatar

schoolboy

Totally Zenned

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

Re: Change Shipping Method TEXT Wording

Maybe AJEH can assist? She is the module's author...

20 years a Zencart User

8 Mar 2013, 2:48 PM
#17
ajeh avatar

ajeh

Oba-san

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

Re: Change Shipping Method TEXT Wording

You could intercept the titles and change them in the USPS module ...

Find where the final output is used and change it to what you want it to read ... example:

[B]echo 'USPS $type: ' . $type . ' $cost: ' . $cost . ' $title: ' . $title . '<br /><br />';
if ($type == 'PARCEL') {
$title = 'FRED';
}
[/B]          $methods[] = array('id' => $type,
                             'title' => $title,
                             'cost' => ($cost * $shipping_num_boxes) + (MODULE_SHIPPING_USPS_HANDLING_METHOD == 'Box' ? $usps_handling_fee * $shipping_num_boxes : $usps_handling_fee) );

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

8 Mar 2013, 9:19 PM
#18
lidlchris avatar

lidlchris

Zen Follower

Join Date:
Feb 2013
Posts:
345
Plugin Contributions:
0

Re: Change Shipping Method TEXT Wording

Ajeh:

You could intercept the titles and change them in the USPS module ...

Find where the final output is used and change it to what you want it to read ... example:

[B]echo 'USPS $type: ' . $type . ' $cost: ' . $cost . ' $title: ' . $title . '<br /><br />';
if ($type == 'PARCEL') {
$title = 'FRED';
}
[/B]
$methods[] = array('id' => $type,
'title' => $title,
'cost' => ($cost * $shipping_num_boxes) + (MODULE_SHIPPING_USPS_HANDLING_METHOD == 'Box' ? $usps_handling_fee * $shipping_num_boxes : $usps_handling_fee) );


WOW - exactly what the doctor ordered...  works perfectly..   thank so much Ajeh..
9 Mar 2013, 1:19 AM
#19
ajeh avatar

ajeh

Oba-san

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

Re: Change Shipping Method TEXT Wording

You are most welcome ... glad this could work for you ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

3 Oct 2013, 9:01 PM
#20
lidlchris avatar

lidlchris

Zen Follower

Join Date:
Feb 2013
Posts:
345
Plugin Contributions:
0

Re: Change Shipping Method TEXT Wording

darn this changed with the new USPS module.. the coding for the echo statement is commented out in the new module so i don't know where to make the changes to change Priority Mail International to Standard International Shipping.. Any ideas?

Ajeh:

You are most welcome ... glad this could work for you ... :smile: