Zen Cart Logo
Forums / Addon Shipping Modules / how do you change the name of a module?

how do you change the name of a module?

Locked

Views: 4,899

Results 1 to 20 of 21
This thread is locked. New replies are disabled.
20 Jun 2006, 5:46 AM
#1
mb1 avatar

mb1

Totally Zenned

Join Date:
Jun 2006
Posts:
565
Plugin Contributions:
0

how do you change the name of a module?

ok i'd like to change the name of a shipping module lets say the flat rate module to Local Shipping or something. how do i go about doing that, what files do i have to play with so i don't get an error.

20 Jun 2006, 6:35 AM
#2
mb1 avatar

mb1

Totally Zenned

Join Date:
Jun 2006
Posts:
565
Plugin Contributions:
0

Re: how do you change the name of a module?

ok i tried this didn't work for me

http://www.zen-cart.com/forum/showthread.php?t=34680&highlight=rename+shipping+module

this is the error i'm getting when i to to install it in the module section of the zencart admin

Warning: main(/home/www/gorillagear.ca/store/includes/languages/english/modules/shipping/delivery.php): failed to open stream: No such file or directory in /home/www/gorillagear.ca/store/admin/modules.php on line 188

Warning: main(/home/www/gorillagear.ca/store/includes/languages/english/modules/shipping/delivery.php): failed to open stream: No such file or directory in /home/www/gorillagear.ca/store/admin/modules.php on line 188

Warning: main(): Failed opening '/home/www/gorillagear.ca/store/includes/languages/english/modules/shipping/delivery.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/www/gorillagear.ca/store/admin/modules.php on line 188

Parse error: parse error, unexpected $, expecting ')' in /home/www/gorillagear.ca/store/includes/modules/shipping/delivery.php on line 95

21 Jun 2006, 5:38 AM
#3
nochio avatar

nochio

New Zenner

Join Date:
Jun 2006
Posts:
10
Plugin Contributions:
0

Re: how do you change the name of a module?

Wish I knew - I'm in the same boat! :dontgetit I tried to change "Flat Rate" to "Pre-paid Satchel" and got this error:

Warning: Cannot modify header information - headers already sent by (output started at /home/nochiosn/public_html/store/includes/languages/english/modules/shipping/flat.php:53) in /home/nochiosn/public_html/store/includes/functions/functions_general.php on line 41

So then I changed it back, but.... I'm still getting the same error. Can anyone help us please? TIA :thumbsup:

21 Jun 2006, 12:58 PM
#4
verdon avatar

verdon

Zen Follower

Join Date:
May 2004
Location:
Northern Ontario, Canada
Posts:
373
Plugin Contributions:
0

Re: how do you change the name of a module?

nochio:

Wish I knew - I'm in the same boat! :dontgetit I tried to change "Flat Rate" to "Pre-paid Satchel" and got this error:

Warning: Cannot modify header information - headers already sent by (output started at /home/nochiosn/public_html/store/includes/languages/english/modules/shipping/flat.php:53) in /home/nochiosn/public_html/store/includes/functions/functions_general.php on line 41

So then I changed it back, but.... I'm still getting the same error. Can anyone help us please? TIA :thumbsup:
That error quite often means that your editor has put an extra return or two at the end of the file you edited. Look to the very bottum and ensure that there is nothing (and I mean no spaces, no new lines, etc) after the final ?>

21 Jun 2006, 2:28 PM
#5
mb1 avatar

mb1

Totally Zenned

Join Date:
Jun 2006
Posts:
565
Plugin Contributions:
0

Re: how do you change the name of a module?

after i changed the capitol to a lower case letter on the (D)delivery.php file now all i get is this error

Shipping Modules

Parse error: parse error, unexpected $, expecting ')' in /home/www/gorillagear.ca/store/includes/modules/shipping/delivery.php on line 95
Modules Sort Order

21 Jun 2006, 2:41 PM
#6
lib99 avatar

lib99

Totally Zenned

Join Date:
Dec 2004
Location:
New York, USA
Posts:
965
Plugin Contributions:
0

Re: how do you change the name of a module?

MB1,

Are you trying to clone the shipping module or just change the title (name)?? Text is changed in language define files and cloning (based on the link you posted earlier) is making an identical second module for 2 different shipping options.

When editing files, DO NOT use the built in editors of cPanel or word processor software. Those insert extra spaces and characters that will corrupt your files. Instead use a good text editor (TextPad, Notepad++, etc..) and FTP client to upload your edited files.

21 Jun 2006, 2:45 PM
#7
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,625
Plugin Contributions:
0

Re: how do you change the name of a module?

If you only want to change the title, open includes/languages/english/modules/shipping/flat.php and change:

define('MODULE_SHIPPING_FLAT_TEXT_TITLE', 'Flat Rate');
define('MODULE_SHIPPING_FLAT_TEXT_DESCRIPTION', 'Flat Rate');
define('MODULE_SHIPPING_FLAT_TEXT_WAY', 'Best Way');

Make your changes and save the changed file to:
includes/languages/english/modules/shipping/YOUR_TEMPLATE/flat.php

21 Jun 2006, 2:50 PM
#8
mb1 avatar

mb1

Totally Zenned

Join Date:
Jun 2006
Posts:
565
Plugin Contributions:
0

Re: how do you change the name of a module?

OK i realized what i did wrong the delivery.php file was cut off at at 97lines when it should of had around 150lines of code i was missing alot of stuff. now i ran into this problem when i try to install the module.

1062 Duplicate entry 'MODULE_SHIPPING_STOREPICKUP_STATUS' for key 2
in:
[insert into storeconfiguration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Delivery Shipping', 'MODULE_SHIPPING_STOREPICKUP_STATUS', 'True', 'Do you want to offer Delivery rate shipping?', '6', '0', 'zen_cfg_select_option(array('True', 'False'), ', now())]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

21 Jun 2006, 3:02 PM
#9
mb1 avatar

mb1

Totally Zenned

Join Date:
Jun 2006
Posts:
565
Plugin Contributions:
0

Re: how do you change the name of a module?

Man what would of been so much easier, i even did that for my in store pick up module but i wasn't just wasn't thinking about that for my local delivery module, i could of just changed the flat rate module and everything would of been fine.

i got the module working but this is my problem when it displays

Store Pickup
5.99CAD
Local Winnipeg Delivery

Store Pickup
0.00CAD
Stop in for pick up

as you can see the box text is the same on both, how do you change the box text from store pick up to say Local delivery?

thanks i'll be looking into right now

21 Jun 2006, 3:06 PM
#10
mb1 avatar

mb1

Totally Zenned

Join Date:
Jun 2006
Posts:
565
Plugin Contributions:
0

Re: how do you change the name of a module?

i figured it out chage the delivery.php file in in the languages section as mentioned above.

thanks for all your help it was much apprecieated

21 Nov 2007, 6:42 PM
#11
mediathing avatar

mediathing

Zen Follower

Join Date:
Apr 2005
Location:
London
Posts:
405
Plugin Contributions:
0

Re: how do you change the name of a module?

I just applied some of the above but got a little prob:

I want to offer freeshipping on ALL orders but give the customer the option of selecting Special Next Day if they want.(I changed the name of flat rate)

I have the freeshipping option on the checkout page but the Special Next Day (flat rate) is not showing. I have read about the free shipper and free shipping options but it's a bit greek to me and I cant seem to get them working together...can you help please.
Thanks
Pete

22 Nov 2007, 7:25 PM
#12
mediathing avatar

mediathing

Zen Follower

Join Date:
Apr 2005
Location:
London
Posts:
405
Plugin Contributions:
0

Re: how do you change the name of a module?

Hi devs,
I really need to get this sorted asap. If one of you can help me fix this (I know it's something small i'm missing) I'll make a donation straight away.

Thanks
Pete

22 Nov 2007, 8:05 PM
#13
kuroi avatar

kuroi

Totally Zenned

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

Re: how do you change the name of a module?

mediathing:

I have the freeshipping option on the checkout page but the Special Next Day (flat rate) is not showing. I have read about the free shipper and free shipping options but it's a bit greek to me and I cant seem to get them working togetherIs the green light on next to the flat rate mod on the shipping modules page in Admin?

22 Nov 2007, 8:14 PM
#14
mediathing avatar

mediathing

Zen Follower

Join Date:
Apr 2005
Location:
London
Posts:
405
Plugin Contributions:
0

Re: how do you change the name of a module?

Yes, I have a green light by flat rate (changed it to special delivery) and a green light by freeshipper. When I go to checkout, only the freeshipper option is showing.
Thanks
Pete

22 Nov 2007, 8:28 PM
#15
mediathing avatar

mediathing

Zen Follower

Join Date:
Apr 2005
Location:
London
Posts:
405
Plugin Contributions:
0

Re: how do you change the name of a module?

I have just changed under modules/order total/shipping allow free shipping true and free shipping over £0.00. But same problem
Pete

22 Nov 2007, 8:31 PM
#16
kuroi avatar

kuroi

Totally Zenned

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

Re: how do you change the name of a module?

Have you set a shipping zone for flat rate / special delivery?

22 Nov 2007, 9:30 PM
#17
mediathing avatar

mediathing

Zen Follower

Join Date:
Apr 2005
Location:
London
Posts:
405
Plugin Contributions:
0

Re: how do you change the name of a module?

I only ship to the Uk and don't require zones within that. Do I still need to allocate a zone to the shipping method?

22 Nov 2007, 9:38 PM
#18
kuroi avatar

kuroi

Totally Zenned

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

Re: how do you change the name of a module?

I was more seeking to eliminate the possibility that you had accidentally restricted it to being used only in a limited area. However, upon reflection, I suspect that the Zen Cart code may be setup so that if free shipping is available, it takes priority over all other options (not 100% sure of that, but suspect it to be the case).

22 Nov 2007, 9:41 PM
#19
mediathing avatar

mediathing

Zen Follower

Join Date:
Apr 2005
Location:
London
Posts:
405
Plugin Contributions:
0

Re: how do you change the name of a module?

I think you're right, however even if I disable the free shipping option the special delivery doesn't show and it just says...sorry but we currently do not ship to your location.

Pete

22 Nov 2007, 11:47 PM
#20
kuroi avatar

kuroi

Totally Zenned

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

Re: how do you change the name of a module?

That would suggest that there is a geographic restriction selected for the mod. Is your store set up to default to the UK? Do you have any zones definitions set up for your your site? What happens if you put something in your cart when you're logged out and then select estimate shipping?