Zen Cart Logo
Forums / General Questions / Clone of table shipping module problem

Clone of table shipping module problem

Locked

Views: 1,464

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
21 Apr 2009, 11:22 AM
#1
sushigal avatar

sushigal

Zen Follower

Join Date:
Mar 2009
Posts:
435
Plugin Contributions:
0

Clone of table shipping module problem

Hi there, I found some instructions in this forum for how to clone a shipping module and create multiple shipping options for my customers. I found the file table.php, cloned it and saved it as table1.php then went through and made all the neccessary changes so that all the words table were changed to table 1 and the same with all words TABLE except for any TABLE or TABLE_ as instructed. It appears to have worked allthough when I go to the modules>shipping in my zen admin There are the following errors;

Warning: main(): Unable to access /home/l/e/leisurelodge_ltd_uk/thegreatgiftshop/zencart/includes/languages/english/modules/shipping/table1.php in /home/l/e/leisurelodge_ltd_uk/thegreatgiftshop/zencart/admin/modules.php on line 173

Warning: main(/home/l/e/leisurelodge_ltd_uk/thegreatgiftshop/zencart/includes/languages/english/modules/shipping/table1.php): failed to open stream: No such file or directory in /home/l/e/leisurelodge_ltd_uk/thegreatgiftshop/zencart/admin/modules.php on line 173

Warning: main(): Failed opening '/home/l/e/leisurelodge_ltd_uk/thegreatgiftshop/zencart/includes/languages/english/modules/shipping/table1.php' for inclusion (include_path='.:/usr/local/lib/php/') in /home/l/e/leisurelodge_ltd_uk/thegreatgiftshop/zencart/admin/modules.php on line 173

So my first question is how can I fix these errors? As I can't see anything on line 173 that needs changing.

Secondly, currently this new shipping module 'table1' is displayed to the customer as;

MODULE_SHIPPING_TABLE1_TEXT_TITLE (1 x 0.50kgs)
MODULE_SHIPPING_TABLE1_TEXT_TITLE

But I want it to read
ROYAL MAIL
SECOND CLASS STANDARD or whatever I choose it to be.

The original 'table' shipping module displays as;

Table Rate (1 x 0.50kgs)
'Best Way'

The same applys to this, I want to be able to change whats displayed but can't see where to do this in table.php

Please help! :wacko:

21 Apr 2009, 11:35 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Clone of table shipping module problem

Warning: main(): Unable to access /home/l/e/leisurelodge_ltd_uk/thegreatgiftshop/zencart/includes/languages/english/modules/shipping/table1.php in /home/l/e/leisurelodge_ltd_uk/thegreatgiftshop/zencart/admin/modules.php on line 173

I suspect that you either have not or incorrectly cloned
/includes/languages/english/modules/shipping/table.php
As
/includes/languages/english/modules/shipping/table1.php
Then in it edit what is between the single quotes DONOT remove the single quote pair

define('MODULE_SHIPPING_TABLE_TEXT_TITLE', 'Table Rate');
define('MODULE_SHIPPING_TABLE_TEXT_DESCRIPTION', 'Table Rate');
define('MODULE_SHIPPING_TABLE_TEXT_WAY', 'Best Way');
define('MODULE_SHIPPING_TABLE_TEXT_WEIGHT', 'Weight');
define('MODULE_SHIPPING_TABLE_TEXT_AMOUNT', 'Amount');
21 Apr 2009, 11:38 AM
#3
sushigal avatar

sushigal

Zen Follower

Join Date:
Mar 2009
Posts:
435
Plugin Contributions:
0

Re: Clone of table shipping module problem

Ok I worked out how to change whats displayed to the customer in checkout for table.php so instead of saying table rate best way it now says Royal Mail and then second class standard is the option. But I can't work out how to do this with the new cloned module called table1.php

21 Apr 2009, 11:45 AM
#5
sushigal avatar

sushigal

Zen Follower

Join Date:
Mar 2009
Posts:
435
Plugin Contributions:
0

Re: Clone of table shipping module problem

Thanks kobra, you're right. I didn't know I had to clone /includes/languages/english/modules/shipping/table.php
As
/includes/languages/english/modules/shipping/table1.php

I have just done that but when I edit it you say to 'edit what is between the single quotes DONOT remove the single quote pair' sorry I'm not quite clear what to do?

Thank you

21 Apr 2009, 11:46 AM
#6
sushigal avatar

sushigal

Zen Follower

Join Date:
Mar 2009
Posts:
435
Plugin Contributions:
0

Re: Clone of table shipping module problem

DO I also need to change the 'table.php' in line 20;

// $Id: table.php 1969 2005-09-13 06:57:21Z drbyte $

to table1.php

21 Apr 2009, 11:49 AM
#7
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Clone of table shipping module problem

Where you see "Best Way" same for others

define('MODULE_SHIPPING_TABLE_TEXT_WAY', 'Best Way');

change to

define('MODULE_SHIPPING_TABLE_TEXT_WAY', 'SECOND CLASS STANDARD');
21 Apr 2009, 11:51 AM
#8
sushigal avatar

sushigal

Zen Follower

Join Date:
Mar 2009
Posts:
435
Plugin Contributions:
0

Re: Clone of table shipping module problem

Yep I've figured that out, ive been able to change table.php but table1.php still reads MODULE_SHIPPING_TABLE1_TEXT_TITLE (1 x 0.50kgs) £5.00MODULE_SHIPPING_TABLE1_TEXT_WAY

please look at this and you will see my problem: http://www.thegreatgiftshop.co.uk/zencart/index.php?main_page=checkout_shipping

21 Apr 2009, 11:51 AM
#9
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Clone of table shipping module problem

DO I also need to change the 'table.php' in line 20;
While that is a comment and not required - for future clarity I would

21 Apr 2009, 11:59 AM
#10
sushigal avatar

sushigal

Zen Follower

Join Date:
Mar 2009
Posts:
435
Plugin Contributions:
0

Re: Clone of table shipping module problem

I've cracked it! :clap:

I hadn't changed each 'TABLE' in the section of code below to 'TABLE1'

define('MODULE_SHIPPING_TABLE1_TEXT_TITLE', 'Royal Mail');
define('MODULE_SHIPPING_TABLE1_TEXT_DESCRIPTION', 'Table Rate');
define('MODULE_SHIPPING_TABLE1_TEXT_WAY', 'First Class Standard');
define('MODULE_SHIPPING_TABLE1_TEXT_WEIGHT', 'Weight');
define('MODULE_SHIPPING_TABLE1_TEXT_AMOUNT', 'Amount');

Thanks so much for your time and help