Forums / Built-in Shipping and Payment Modules / Shipping module cloning

Shipping module cloning

Locked
Results 1 to 20 of 22
This thread is locked. New replies are disabled.
09 Dec 2010, 11:55
#1
jmp04 avatar

jmp04

New Zenner

Join Date:
Dec 2010
Posts:
66
Plugin Contributions:
0

Shipping module cloning

Hi all.

Ive tried cloning the shipping module "table.php" into another one so that its "tableexpress.php" following the guide that the tutorial section points you to.

I mush be doing something wrong as when i upload the file to

includes/modules/shipping

im not getting the module appear in my shipping modules list, and it removes the right hand collum (that gives you the ability to edit settings) from the admin section.

Any ideas on what im doing wrong ?
09 Dec 2010, 15:07
#2
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Posts:
6,263
Plugin Contributions:
3

Re: Shipping module cloning

jmp04:

Hi all.

Ive tried cloning the shipping module "table.php" into another one so that its "tableexpress.php" following the guide that the tutorial section points you to.

I mush be doing something wrong as when i upload the file to

includes/modules/shipping

im not getting the module appear in my shipping modules list, and it removes the right hand collum (that gives you the ability to edit settings) from the admin section.

Any ideas on what im doing wrong ?


Did you also create and upload a /languages/tableexpress.php file as well? If not, create one and upload it. (If I recall correclty the file doesn't need any data, it simply needs to exist).

Cheers
Rod (author of ozpost; the ultimate shiiping module for Australian Merchants)
09 Dec 2010, 16:04
#3
jmp04 avatar

jmp04

New Zenner

Join Date:
Dec 2010
Posts:
66
Plugin Contributions:
0

Re: Shipping module cloning

i did include a languages file also.

Im quite stumped.
09 Dec 2010, 17:00
#4
ajeh avatar

ajeh

Oba-san

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

Re: Shipping module cloning

Table Rate table can be a bit tricky as the word:
TABLE

is also used for other things such as the database tables ...

You might want to compare your customized file to the original file with something like Beyond Compare from scootersoftware.com and make sure that you did not change too many TABLE to TABLEEXPRESS ...
09 Dec 2010, 20:01
#5
jmp04 avatar

jmp04

New Zenner

Join Date:
Dec 2010
Posts:
66
Plugin Contributions:
0

Re: Shipping module cloning

Ajeh:

Table Rate table can be a bit tricky as the word:
TABLE

is also used for other things such as the database tables ...

You might want to compare your customized file to the original file with something like Beyond Compare from scootersoftware.com and make sure that you did not change too many TABLE to TABLEEXPRESS ...


how does this software work and what does it do ?

im asuming it will check the functions and how they are working ?
09 Dec 2010, 20:46
#6
ajeh avatar

ajeh

Oba-san

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

Re: Shipping module cloning

It just compares two files and shows the differences ...

There is a Trial version that you can get ...

The purchased version allows a comparison from files on your computer to files on your server via FTP ...
09 Dec 2010, 20:50
#7
jmp04 avatar

jmp04

New Zenner

Join Date:
Dec 2010
Posts:
66
Plugin Contributions:
0

Re: Shipping module cloning

Ahh okay.

Only problem there is, i dont know exactly which bits of table and TABLE i should be changing to tableexpress and TABLEEXPRESS, and i have both the docs open on my computer anyway saved as table and tableexpress so can flip between then easy enough (and i have 20/20 vision :p)

I think its a case of just not knowing which bits of text are functional and which bits correspond to the tableexpress module itself :S
09 Dec 2010, 22:20
#8
ajeh avatar

ajeh

Oba-san

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

Re: Shipping module cloning

If the table being referred to is a database table, then do not change its name ...

Examples:
TABLE_CONFIGURATION
TABLE_ZONES_TO_GEO_ZONES

are database tables ... don't change those ...
10 Dec 2010, 13:58
#9
jmp04 avatar

jmp04

New Zenner

Join Date:
Dec 2010
Posts:
66
Plugin Contributions:
0

Re: Shipping module cloning

Ajeh:

If the table being referred to is a database table, then do not change its name ...

Examples:
TABLE_CONFIGURATION
TABLE_ZONES_TO_GEO_ZONES

are database tables ... don't change those ...


thank you for this.

I will try again and cross reference against someting like the "flat" shipping module as that will be easier to look at given theres no queries or functions under that name etc...
10 Dec 2010, 18:29
#10
jmp04 avatar

jmp04

New Zenner

Join Date:
Dec 2010
Posts:
66
Plugin Contributions:
0

Re: Shipping module cloning

I have tried cross referenceing it but again to no avail.

I know im doing something wrong but i dont know what. Really stumped. :wacko:
10 Dec 2010, 20:33
#11
ajeh avatar

ajeh

Oba-san

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

Re: Shipping module cloning

Could you post your whole file for the:
/includes/modules/shipping/tableexpress.php

from the server ...

and the file:
/includes/languages/english/modules/shipping/tableexpress.php


Also check that you have no extra files, such as backup files in the directory:
/includes/modules/shipping

as this is an autoloading directory and that would cause problems ...

Assuming you are in v1.3.9, can you also look in your /cache directory for debug logs ...
10 Dec 2010, 20:47
#12
jmp04 avatar

jmp04

New Zenner

Join Date:
Dec 2010
Posts:
66
Plugin Contributions:
0

Re: Shipping module cloning

Ajeh:

Could you post your whole file for the:
/includes/modules/shipping/tableexpress.php

from the server ...

and the file:
/includes/languages/english/modules/shipping/tableexpress.php


Also check that you have no extra files, such as backup files in the directory:
/includes/modules/shipping

as this is an autoloading directory and that would cause problems ...

Assuming you are in v1.3.9, can you also look in your /cache directory for debug logs ...



Not a problem, i will get the debug logs downloaded now but theres quite alot.

The tableexpress module isnt on the server as i cant alther my current modules when it is but have it saved locally so it will be included in this post.
10 Dec 2010, 21:02
#13
jmp04 avatar

jmp04

New Zenner

Join Date:
Dec 2010
Posts:
66
Plugin Contributions:
0

Re: Shipping module cloning

debug log:

[09-Dec-2010 11:51:36] PHP Fatal error: Cannot redeclare class table in /home/sites/martinpollardart.co.uk/public_html/includes/modules/shipping/tableexpress.php on line 209
10 Dec 2010, 21:22
#14
ajeh avatar

ajeh

Oba-san

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

Re: Shipping module cloning

For starters:
class table extends base {


should be:
class tableexpress extends base {
10 Dec 2010, 21:43
#15
jmp04 avatar

jmp04

New Zenner

Join Date:
Dec 2010
Posts:
66
Plugin Contributions:
0

Re: Shipping module cloning

Ajeh:

For starters:
class table extends base {


should be:
class tableexpress extends base {



And i honestly cannot believe i missed that !!

Many thanks for saving my sanity :)

Much appriciated indeed. Working perfectly now
10 Dec 2010, 21:49
#16
jmp04 avatar

jmp04

New Zenner

Join Date:
Dec 2010
Posts:
66
Plugin Contributions:
0

Re: Shipping module cloning

One tiny issue actually.

Theres no Zone selection option when you come to setting the values :S
10 Dec 2010, 21:57
#17
jmp04 avatar

jmp04

New Zenner

Join Date:
Dec 2010
Posts:
66
Plugin Contributions:
0

Re: Shipping module cloning

Also, on the original table module, theres a yellow circle next to it, unsire why, as theres a green circle next to the tableexpress one you have just helped me create from it. abit bizarre
10 Dec 2010, 22:20
#18
ajeh avatar

ajeh

Oba-san

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

Re: Shipping module cloning

The Green means no Zones are set ...

The Yellow means either Zones are set or something isn't configured ... based on this module ... it would mean a Zone is set ...

You have EXPRESS in the wrong place on it ... and an error here:

Should be here:
   'title' => MODULE_SHIPPING_TABLEEXPRESS_TEXT_WAY,


And should be:
    return array('MODULE_SHIPPING_TABLEEXPRESS_STATUS', 'MODULE_SHIPPING_TABLEEXPRESS_COST', 'MODULE_SHIPPING_TABLEEXPRESS_MODE', 'MODULE_SHIPPING_TABLEEXPRESS_HANDLING', 'MODULE_SHIPPING_TABLEEXPRESS_HANDLING_METHOD', 'MODULE_SHIPPING_TABLEEXPRESS_TAX_CLASS', 'MODULE_SHIPPING_TABLEEXPRESS_TAX_BASIS', 'MODULE_SHIPPING_TABLEEXPRESS_ZONE', 'MODULE_SHIPPING_TABLEEXPRESS_SORT_ORDER');
10 Dec 2010, 22:45
#19
jmp04 avatar

jmp04

New Zenner

Join Date:
Dec 2010
Posts:
66
Plugin Contributions:
0

Re: Shipping module cloning

Ajeh:

The Green means no Zones are set ...

The Yellow means either Zones are set or something isn't configured ... based on this module ... it would mean a Zone is set ...

You have EXPRESS in the wrong place on it ... and an error here:

Should be here:
   'title' => MODULE_SHIPPING_TABLEEXPRESS_TEXT_WAY,


And should be:
    return array('MODULE_SHIPPING_TABLEEXPRESS_STATUS', 'MODULE_SHIPPING_TABLEEXPRESS_COST', 'MODULE_SHIPPING_TABLEEXPRESS_MODE', 'MODULE_SHIPPING_TABLEEXPRESS_HANDLING', 'MODULE_SHIPPING_TABLEEXPRESS_HANDLING_METHOD', 'MODULE_SHIPPING_TABLEEXPRESS_TAX_CLASS', 'MODULE_SHIPPING_TABLEEXPRESS_TAX_BASIS', 'MODULE_SHIPPING_TABLEEXPRESS_ZONE', 'MODULE_SHIPPING_TABLEEXPRESS_SORT_ORDER');



Which lines need ammending or things inserting as i cant seem to see them.

My ineptitude really does know no bounds today.
11 Dec 2010, 00:39
#20
ajeh avatar

ajeh

Oba-san

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

Re: Shipping module cloning

The lines I posted are the fixed lines ...

you have:
    'title' => MODULE_SHIPPINGEXPRESS_TABLE_TEXT_WAY,


    return array('MODULE_SHIPPING_TABLEEXPRESS_STATUS', 'MODULE_SHIPPING_TABLEEXPRESS_COST', 'MODULE_SHIPPING_TABLEEXPRESS_MODE', 'MODULE_SHIPPING_TABLEEXPRESS_HANDLING', 'MODULE_SHIPPING_TABLEEXPRESS_HANDLING_METHOD', 'MODULE_SHIPPING_TABLEEXPRESS_TAX_CLASS', 'MODULE_SHIPPING_TABLEEXPRESS_TAX_BASIS', 'MODULE_SHIPPINGEXPRESS_TABLE_ZONE', 'MODULE_SHIPPING_TABLEEXPRESS_SORT_ORDER');


Both lines are incorrectly written with:
SHIPPINGEXPRESS