Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2006
    Location
    Australia
    Posts
    15
    Plugin Contributions
    0

    Default 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?

  2. #2
    Join Date
    Jan 2004
    Location
    UK
    Posts
    1,231
    Plugin Contributions
    0

    Default 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

    Line 13 is:

    PHP Code:
    class table extends base 
    It looks like you haven't changed the class name, hence the 'Cannot redeclare class ...' error you're getting.

  3. #3
    Join Date
    Aug 2006
    Location
    Australia
    Posts
    15
    Plugin Contributions
    0

    Default 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

  4. #4
    Join Date
    Jan 2004
    Location
    UK
    Posts
    1,231
    Plugin Contributions
    0

    Default 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.

  5. #5
    Join Date
    Aug 2006
    Location
    Australia
    Posts
    15
    Plugin Contributions
    0

    Default 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.

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,726
    Plugin Contributions
    6

    Default 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: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

 

 

Similar Threads

  1. Replies: 37
    Last Post: 7 Jul 2008, 07:17 PM
  2. 1.3.2 to 1.3.5
    By RobWUK in forum Upgrading from 1.3.x to 1.3.9
    Replies: 14
    Last Post: 27 Sep 2006, 12:35 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •