Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2012
    Posts
    2
    Plugin Contributions
    0

    Default Trying to clone a Table Rate

    I have installed Zen Cart v1.5.0 and would like to have more than one Table Rate on my site. I couldn’t find any existing add-on that supports Zen Cart v1.5.0 so have to modify the code. I compare the Table Rate Clone for Zen Cart v1.3.8 with the current version of Zen Cart Table Rate code and found that the only difference starts from line 64 in the original table.php,

    PHP Code:
    if ($this->enabled) {
          
    // check MODULE_SHIPPING_TABLE_HANDLING_METHOD is in
          
    $check_query $db->Execute("select configuration_value from " TABLE_CONFIGURATION " where configuration_key = 'MODULE_SHIPPING_TABLE_HANDLING_METHOD'");
          if (
    $check_query->EOF) {
            
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Handling Per Order or Per Box', 'MODULE_SHIPPING_TABLE_HANDLING_METHOD', 'Order', 'Do you want to charge Handling Fee Per Order or Per Box?', '6', '0', 'zen_cfg_select_option(array(\'Order\', \'Box\'), ', now())");
          }

    Should I modify these lines in order to clone extra rate table? If the answer is Yes, what should I change?

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Trying to clone a Table Rate

    Yes you should change all references that follow the pattern of:
    table to tablesomething
    TABLE to TABLESOMETHING

    except for things that start with:
    TABLE_

    Example:
    TABLE_CONFIGURATION

    as those are database table references ...
    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!

  3. #3
    Join Date
    Jul 2012
    Posts
    2
    Plugin Contributions
    0

    Default Re: Trying to clone a Table Rate

    Hi Ajeh,

    Thanks for you help!!! I have successfully cloned few working Table Rate by changing all the "table to tablesomething" (except TABLE_CONFIGURATION and TABLE_ZONES_TO_GEO_ZONES (line 74), you saved my life!!!!

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Trying to clone a Table Rate

    You are most welcome thanks for the update that this is working for you now ...
    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!

 

 

Similar Threads

  1. v154 Help with Table Rate Clone
    By zacm in forum Addon Shipping Modules
    Replies: 2
    Last Post: 15 Mar 2016, 02:01 PM
  2. Shipping - Table Rate Clone
    By Nick1973 in forum General Questions
    Replies: 5
    Last Post: 2 Feb 2011, 04:23 PM
  3. Zones Table Rate Shipping Module clone
    By maclean in forum Addon Shipping Modules
    Replies: 2
    Last Post: 24 Jul 2009, 04:59 PM
  4. Need a Zone Table Rate Clone??
    By mylildarlings in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 11 Oct 2008, 06:31 AM
  5. Table Rate Clone
    By maiko in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 28 Aug 2008, 03:35 PM

Posting Permissions

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