Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2007
    Posts
    138
    Plugin Contributions
    0

    Default Multiple cloned USPS modules?

    I'd like to create a USPS shipping module for each USPS service (don't ask why...3rd party software restriction). I thought it was possible to copy the usps.php file to something like usps_priority.php and place it in the /includes/modules/shipping directory, but that doesn't seem to be working. I'm getting a few errors. One error is about not being able to redeclare the class, so I'm assuming I can rename it. The other is about missing english files, so I'm thinking I can copy those as well. Am I missing something? Is this possible?

  2. #2
    Join Date
    Apr 2007
    Posts
    138
    Plugin Contributions
    0

    Default Re: Multiple USPS modules?

    Well, doing the rename partially worked. No more errors in the admin shipping module section, but it's coming up without any description or module name and a red dot. So something isn't working.

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,883
    Plugin Contributions
    96

    Default Re: Multiple cloned USPS modules?

    It's necessary, but insufficient, to simply create a copy of the usps.php file. You also need to change the names of the fields associated with the module.

    For example, if your usps clone is usps_priority, you'd edit \includes\modules\shipping\usps_priority.php and \includes\english\modules\shipping\usps_priority.php and change all occurrences of _USPS_ to _USPS_PRIORITY_.

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

    Default Re: Multiple cloned USPS modules?

    Be careful on the use of the underscore ...

    For example, cloning Flat you would NOT use:
    flat_us FLAT_US
    flat_priority FLAT_PRIORITY

    you would use:
    flatus FLATUS
    flatpriority FLATPRIORITY

    On the clone of USPS be careful on global variables so they do not get mixed up with one another as the modules run ...
    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 Cloned Shipping for 3 modules - various Countries and Costs
    By cuysan in forum Addon Shipping Modules
    Replies: 8
    Last Post: 22 Feb 2016, 11:59 PM
  2. Question on cloned table shipping modules and 1.3.9 upgrade
    By earmsby in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 16 Jun 2010, 03:42 PM
  3. My cloned flat and freeoptions modules don't work
    By breadfan in forum Built-in Shipping and Payment Modules
    Replies: 6
    Last Post: 23 Sep 2008, 04:45 AM
  4. Cloned Shipping Modules connected in Admin?
    By munchkinhead in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 19 Aug 2007, 01:51 AM
  5. cloned shipping modules
    By paulm in forum Addon Shipping Modules
    Replies: 0
    Last Post: 19 Nov 2006, 02:05 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