Post by barkingkiwi » Sat Mar 07, 2015 9:02 am

I'm attempting to have to different USPS mods active at the same time - I'm using this as a workaround, if you'd like to know why, I'll be happy to explain.

So for instance, I'm using the USPS mod that came with OpenCart and also the alternate mod found here.

It mostly works fine - they're both enabled, they both appear when a customer checks out. My issue is, I need them to have distinct settings - i.e. have different services activated or use two unique USPS ID's.

The issue is, they seem to share settings. One will always override the other, and I they will never save settings separately from one or the other. An example, if I put in one USPS user ID into the alternate USPS mod, it will change the user ID in the other mod, or immediately revert the alternate mod to the main mod's user ID.

I have tried my best to use my limited knowledge to change the code so they are not sharing settings, but I can't figure it out. Does anyone know either 1) how to get them to have distinct settings or 2) where OpenCart saves these settings, so I can maybe at least figure out some code to change to get them to save them differently (I suspect there is some code within them that tells it where to save these settings that is the same).

Thanks for your help!

Newbie

Posts

Joined
Fri Feb 13, 2015 3:59 am

Post by Johnathan » Sun Mar 08, 2015 1:29 am

It's likely that the USPS Alternate module just re-uses the settings code for the built-in one, rather than adding its own settings code . What you'd need to do in this case is duplicate the original (or the alternate) extension so that it uses its own settings code. You can do this by:

1. Duplicating all the files, and renaming them to usps2.php (or something similar)
2. Changing all instances of "usps" in the files to "usps2". This includes the ControllerShippingUsps string and the ModelShippingUsps string.

Once you load and save the settings, they should appear in the "setting" table with the group for the settings code (usps or usps2). Hope that helps

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am

Who is online

Users browsing this forum: No registered users and 7 guests