Forums / Addon Shipping Modules / Cloning Table Rate mode

Cloning Table Rate mode

Locked

Started by sylsau on 14 Dec 2006, 12:52 PM · Views: 2,198

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
14 Dec 2006, 12:52 PM
#1
sylsau avatar

sylsau

New Zenner

Join Date:
Aug 2006
Location:
Australia
Posts:
15
Plugin Contributions:
0

Cloning Table Rate mode

I like to clone the table rate mode, I changed the name to Express after I upload the two files I get the error message:
Fatal error: Cannot redeclare class table in /home/stackcup/public_html/shop/includes/modules/shipping/table.php on line 13
and the original table rate module does not show up anymore until I delete this file.
at this file in Line 13 I can only see the description of the license.
What do I miss here?

14 Dec 2006, 11:03 PM
#2
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: Cloning Table Rate mode

Did you just rename the files (ie. just change the filenames)? You need to change the contents of the files too :smile:

Line 13 is:

class table extends base {

It looks like you haven't changed the class name, hence the 'Cannot redeclare class ...' error you're getting.

15 Dec 2006, 12:29 PM
#3
sylsau avatar

sylsau

New Zenner

Join Date:
Aug 2006
Location:
Australia
Posts:
15
Plugin Contributions:
0

Re: Cloning Table Rate mode

Thank you I had looked in the wrong file, I changed this as well to Express now and it showed up. I tried to configure this module, it seems not to install now I get a different message if I tray to reinstall a different message:
1062 Duplicate entry 'MODULE_SHIPPING_EXPRESS_STATUS' for key 2
in:
[insert into zen_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Enable Express Method', 'MODULE_SHIPPING_EXPRESS_STATUS', 'True', 'Do you want to offer table 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.

Thanks for your help.
Sylvia

15 Dec 2006, 3:40 PM
#4
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: Cloning Table Rate mode

Do a search with your text editor to see if you have any instances of 'table' still left in includes/modules/shipping/table.php.

16 Dec 2006, 12:58 AM
#5
sylsau avatar

sylsau

New Zenner

Join Date:
Aug 2006
Location:
Australia
Posts:
15
Plugin Contributions:
0

Re: Cloning Table Rate mode

I had done the search and left only table where it says TABLE_CONFIGURATION, this says table at the other modules as well I believe this table does not refer to the file name. I believe the Line $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Enable Express Method', 'MODULE_SHIPPING_EXPRESS_STATUS', 'True', 'Do you want to offer express rate shipping?', '6', '0', 'zen_cfg_select_option(array('True', 'False'), ', now())"); is the problem, I compared this line to other Execute lines to other modules I can not figure out the problem.

16 Dec 2006, 1:16 AM
#6
ajeh avatar

ajeh

Oba-san

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

Re: Cloning Table Rate mode

Backup your database ...

Go into phpMyAdmin and click on the table:
configuration

Now click on the link for Search

Under the configuration_key set to:
Like % ... %
MODULE_SHIPPING_EXPRESS

Delete all of those ...

What happens now?

Sounds like your file is not setup to delete/add all the keys right ...

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!