Page 2 of 9 FirstFirst 1234 ... LastLast
Results 11 to 20 of 89
  1. #11
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Tips on cloning Table Rate shipping module

    The difficult thing about cloning Table Rate table is that the buzz word is:
    table

    And table is part of the code but it also is a part of the naming for the database tables as well ...

    Because of this, you will go along doing your replaces and replace too many things and break the heck out of the code ...

    This should not have been touched
    TABLE2_CONFIGURATION
    Originally this was:
    TABLE_CONFIGURATION
    and refers to the database table configuration ...

    You need to watch that the replacement of TABLE with SOMETHINGELSE does not touch any references to the database table constants that are also in CAPS and start with TABLE_ ... or you will be doomed ...
    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!

  2. #12
    Join Date
    Oct 2008
    Location
    Hornell, NY
    Posts
    334
    Plugin Contributions
    1

    Default Re: Tips on cloning Table Rate shipping module

    Quote Originally Posted by Ajeh View Post
    The difficult thing about cloning Table Rate table is that the buzz word is:
    table

    And table is part of the code but it also is a part of the naming for the database tables as well ...

    Because of this, you will go along doing your replaces and replace too many things and break the heck out of the code ...

    This should not have been touched


    Originally this was:


    and refers to the database table configuration ...

    You need to watch that the replacement of TABLE with SOMETHINGELSE does not touch any references to the database table constants that are also in CAPS and start with TABLE_ ... or you will be doomed ...
    Alright that seems like a pretty easy fix

  3. #13
    Join Date
    Oct 2008
    Location
    Hornell, NY
    Posts
    334
    Plugin Contributions
    1

    Default Re: Tips on cloning Table Rate shipping module

    Alright, I made that change. It shows in the admin section, but whenever I change the sort order of one, it changes the other the same, how can I stop this?

    here is the screen shot with the Warning:

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

    Default Re: Tips on cloning Table Rate shipping module

    I'd go through the code again and see what other errors you might have ...

    You have to be careful and be sure to update ALL of the:
    table to table2
    TABLE to TABLE2

    but NOT change any of the references to the constants that are referring to the database tables ...
    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!

  5. #15
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,840
    Plugin Contributions
    31

    Default Re: Tips on cloning Table Rate shipping module

    Hi,
    I wasted a lot of time discovering that the filename for the cloned module should not have an underscore in it:

    flat_clone.php = bad
    flatclone.php = good

    It will show up in Admin and install ok, but checkout but will not go to step 2.

    Maybe the cognescenti could confirm that underscores are a no-no Zen-wide or just in the Shiping and Payment modules.

    regards
    Steve

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

    Default Re: Tips on cloning Table Rate shipping module

    Don't use the underscore ...

    When you do:
    flat
    flat_something

    flat will equate to flat_something during validation in the code and make a real mess ...

    Rule of thumb ... if it hurt when you hit your thumb with the hammer, don't hit your thumb with the hammer ...
    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!

  7. #17
    Join Date
    Oct 2008
    Location
    Hornell, NY
    Posts
    334
    Plugin Contributions
    1

    Default Re: Tips on cloning Table Rate shipping module

    Quote Originally Posted by Ajeh View Post
    I'd go through the code again and see what other errors you might have ...

    You have to be careful and be sure to update ALL of the:
    table to table2
    TABLE to TABLE2

    but NOT change any of the references to the constants that are referring to the database tables ...
    Hey just a question, I am starting over and starting from scratch to make sure I do this right....

    The code shirster posted that will it be fine to use if I copy and paste it into a new tabe2.php file since the code is for 1.3.7?

    What I did was just copy the table.php and renamed it to table2.php and did the renaming as it said to in the first post in this thread

    It is showing she/he is renaming the TABLE_CONFIGURATION files inserting "TABLE2" into the lines

  8. #18
    Join Date
    Oct 2008
    Location
    Hornell, NY
    Posts
    334
    Plugin Contributions
    1

    Default Re: Tips on cloning Table Rate shipping module

    Quote Originally Posted by chris32882 View Post
    Hey just a question, I am starting over and starting from scratch to make sure I do this right....

    The code shirster posted that will it be fine to use if I copy and paste it into a new tabe2.php file since the code is for 1.3.7?

    What I did was just copy the table.php and renamed it to table2.php and did the renaming as it said to in the first post in this thread

    It is showing she/he is renaming the TABLE_CONFIGURATION files inserting "TABLE2" into the lines
    hmm still can't figure this out...

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

    Default Re: Tips on cloning Table Rate shipping module

    TABLE_CONFIGURATION is referring to the configuration table and should not be touched as this instance of TABLE_ means what database table to use ...
    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!

  10. #20
    Join Date
    Oct 2008
    Location
    Hornell, NY
    Posts
    334
    Plugin Contributions
    1

    Default Re: Tips on cloning Table Rate shipping module

    Quote Originally Posted by Ajeh View Post
    TABLE_CONFIGURATION is referring to the configuration table and should not be touched as this instance of TABLE_ means what database table to use ...
    ok I thought you meant just for "TABLE_CONFIGURATION" instead of all caps that include TABLE

 

 
Page 2 of 9 FirstFirst 1234 ... LastLast

Similar Threads

  1. Cloning the Flat Rate Shipping Module
    By jo_h1971 in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 16 Oct 2009, 12:11 PM
  2. cloning table rate crushed
    By deadheat1 in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 16 Jul 2008, 02:01 AM
  3. Clone a shipping module or define a new shipping attribute under table rate module?
    By meeven in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 4 Sep 2007, 04:56 PM
  4. Cloning Table Rate mode
    By sylsau in forum Addon Shipping Modules
    Replies: 5
    Last Post: 16 Dec 2006, 02:16 AM
  5. cloning the shipping module - table
    By drmad in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 20 Oct 2006, 08:11 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