Results 1 to 10 of 18

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Posts
    42
    Plugin Contributions
    0

    Default Error cloning a shipping module

    I followed the instructions here:

    http://www.zen-cart.com/forum/showth...hipping+module

    for cloning a module. I clone the UPS module, and renamed the 2 files to ups-canada.php

    I renamed the class from ups to ups-canada and the SHIPPING_MODULE_UPS_ to SHIPPING_MODULE_UPS-CANADA in both file.

    When I try to load up the shipping modules, I get the following error:

    Fatal error: Cannot redeclare class ups in C:\Program Files\xampp\htdocs\connequestrian\store\includes\modules\shipping\ups.php

    Line 447, btw, is a comment line.


    Anyone got any clues???

    Thanks,

    Brain21

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

    Default Re: Error cloning a shipping module

    The naming is crossing on UPS vs UPS-blah in the keys ...
    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
    Sep 2006
    Posts
    42
    Plugin Contributions
    0

    Default Re: Error cloning a shipping module

    What keys, where? You just spoke greek to me. :-)


    Is there a specific line of code that you are talking about???

    Thanks,

    Brain21

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

    Default Re: Error cloning a shipping module

    Change the UPS-CANADA to UPSCANADA and change ups-canada to upscanada and be sure to change the two filenames to upscanada.php as well ...
    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. #5
    Join Date
    Sep 2006
    Posts
    42
    Plugin Contributions
    0

    Default Re: Error cloning a shipping module

    Did that. Still getting the same error. It is now loading the ups module, but the error is EXACTLY like it was before, only now the module is upscanada.php rather than ups.php. Same line and everything.

    Here is the line its crapping out on (this time line 447 isn't a comment line):

    $body_array = explode("\n", $body);

    The php file itself can be gotten from my server:

    ftp turdferguson.kicks-***.org

    UID: guest
    Passwd: guest

    upscanada.php is the only file there

    And since this site is censoring bad words, the site is not
    .kicks-***.org
    but
    . k i c k s - a s s . o r g

    Thanks,

    Alex F

  6. #6
    Join Date
    Sep 2006
    Posts
    42
    Plugin Contributions
    0

    Default Re: Error cloning a shipping module

    OK, so I think maybe the error is actually on line 13 where the class ups is being called:

    class ups extends base {

    So I change it to this:

    class upscanada extends base {

    Save and reload the shipping module.

    Well, now I am not getting those errors anymore. There is a new shipping module now showing.

    The module title is blank. I click on it. The little window to the right has no title or text of any kind, but it does have an install button. I click on install.

    Now I am getting the following error:

    Warning: reset() [function.reset]: Passed variable is not an array or object in C:\Program Files\xampp\htdocs\connequestrian\store\admin\modules.php on line 279

    Warning: Variable passed to each() is not an array or object in C:\Program Files\xampp\htdocs\connequestrian\store\admin\modules.php on line 280


    Out of the fryingpan and into the fire.

    I just don't get why this isn't easy. It is NOT uncommon for people to use different shipping rates to different countries for a single shipping method. In fact, when I was searching the forums I saw a number of posts from 2004 asking for this capability. If it's not built-in and we have to resort to manually cloning a module and then running into all sorts of cryptic errors & problems, and basically NO documentation in this crap, then why didn't the devs simply create a script & button. "Click here to clone a shipping module". Then it presents you w/ a drop down list of all of the installed modules. You select the one you want and enter in a new name for it, and viola! Done. Very frustrating....

    Thanks for any help!

    Brain21

 

 

Similar Threads

  1. Shipping module cloning
    By jmp04 in forum Built-in Shipping and Payment Modules
    Replies: 21
    Last Post: 11 Dec 2010, 02:36 PM
  2. Cloning USPS Shipping Module
    By elgrcg in forum Addon Shipping Modules
    Replies: 3
    Last Post: 3 Dec 2010, 10:52 PM
  3. 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
  4. 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