Skip to main content

United States Postal Service (USPS) Module

More
15 years 2 months ago #21428 by mindstorm
I will be MORE THEN happy to donate to the USPS solution!! Really need something like this ASAP... In fact I'm considering dumping my Hika Shop without this!?!?! :(
The following user(s) said Thank You: brayden10

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #21581 by jeffcj
Perhaps one of the devs can chime in here.

I'm working on including an address validator in the USPS plugin. Basically the shipping addresses is sent to USPS, then returned in a USPS correctly formatted condition. What would be the recommended way to show the USPS "revised" address to the customer to confirm it is correct?

Also, is there a capacity in the shipping module API to allow for "optional services" (ex: insurance) on a per order basis? I could easily add it as a fixed option in the plugin configuration to either always/never include insurance, but a per transaction basis would be preferable I think.

Lastly, some of the verbiage (ex: "by air", "by sea") for the AusPost plugin is included in the language file for Hikashop. This is good in that it allows the text to be customized per language. However, I don't actually know how I would programatically "add to" the language file to include the USPS display texts for, say, English. I have just added them manually in my test install. This isn't critical, but I thought it was worth asking.


We're getting close, folks.


Like my work? Click here to donate.

Your support is appreciated and helps keep me motivated to continue writing code.
The following user(s) said Thank You: brayden10

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #21582 by nicolas
When we have a message to display to the user we usually use the code:
$app=&Jfactory::getApplication();
$app->enqueueMessage($message);
There, you can have several lines as well as HTML, so you could ask the question there with a link to modify the address or something like that.

There is no real API for that. Each plugin must add it on its own. In the onShippingDisplay method, you could add your radio buttons HTML at the end of the shipping_description of your plugin. The in the onShippingSave method, you could handle the value returned in the post and set a flag in order to modify the prices of the shipping plugin.

HikaShop shipping plugins are standard joomla plugins. Joomla plugins can have their own language files so you could include your own language files in the plugin package directly. There are some explanations on that there: docs.joomla.org/Creating_a_content_plugin
The following user(s) said Thank You: brayden10

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #21745 by mindstorm
I'm sorry to say we are going to dump out Hika Shop because of the lack of shipping integration. :(

love everything else!
The following user(s) said Thank You: brayden10

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago - 15 years 2 months ago #21746 by mindstorm
Last edit: 15 years 2 months ago by mindstorm.
The following user(s) said Thank You: brayden10

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #21747 by nicolas
I'm sorry to hear that. A UPS plugin will be able in next version of HikaShop (before the end of July) and as you can read on that thread, jeffcj has already made good progress on his USPS plugin.
The following user(s) said Thank You: brayden10

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #21762 by FreshIdeas
I would love to see both a UPS and and USPS plug-in!
The following user(s) said Thank You: brayden10

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #21767 by nicolas
The UPS plugin is already working on our end and has been tested already. The documentation is ready too. We're just waiting for next release to publish everything.
The following user(s) said Thank You: brayden10

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago - 15 years 2 months ago #21838 by jeffcj
Hello,
I admit, I've ran short on time in the past few weeks trying to put together a nice USPS module for everyone.

However, as an interim solution, I hacked the attached version together based on the AuPost module that already exists in Hikashop.

It isn't pretty, but it should get you shipping quotes for:

USPS Priority Mail
USPS Express Mail
USPS Parcel Post
USPS First Class Mail (Parcel)
International Priority Mail (Parcel)


Instructions:

Install the module as you would any other standard Joomla Plugin.
Activate the plugin(if necessary)
The module should then be available under the "Shipping Methods" configuration in HikaShop.

You *must* set the Post Code, USPS Webtools User ID, and select one or more shipping services.


If you do not already have an active Webtools account, register at secure.shippingapis.com/registration/ . You will receive a USPS WEbtools USER ID that must be entered into the user ID field in the plugin settings.

The postal code should be set to the 5 digit US zip code where shipments will originate from.

However, there's another step that must be completed before it will work. By default, webtools users are not given access to the production server (only the test environment). You must contact the USPS ICCC and tell them to allow your user ID access to the production server. They will want to know what software you're using. I recommend sending an e-mail to uspstechsupport@esecurecare.net that says "Hi, Please move user ID ________ to the production server. I will be using the Hikashop shopping cart."

USPS Contact Info:
E-mail: uspstechsupport@esecurecare.net
Telephone: 1-800-344-7779


This is an early release that does not share the same codebase as the new version I'm working on. However, it should work! If you run into any problems, please reply in this thread.

Donations are not required, but are certainly welcome and really appreciated. Paypal: jeffcj at gmail dot com.

Hope this is useful!

Jeff

This attachment is hidden for guests.
Please log in or register to see it.



Like my work? Click here to donate.

Your support is appreciated and helps keep me motivated to continue writing code.
Last edit: 15 years 2 months ago by jeffcj.
The following user(s) said Thank You: brayden10

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #21841 by nicolas
That's great !
Thank you for sharing your work with everyone !
The following user(s) said Thank You: brayden10

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #21843 by hanskleinert
Thanks Jeff, with appreciation
The following user(s) said Thank You: brayden10

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #21853 by mindstorm
LOOKING FORWARD TO TRYING THIS ASAP!!
The following user(s) said Thank You: brayden10

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #21855 by mindstorm
Installed and activated. When I go to options i get the following:

Fatal error: Call to undefined function hikashop_get() in /home/masilun/public_html/showernichekit.com/plugins/hikashopshipping/usps.php on line 330

Any ideas?
The following user(s) said Thank You: brayden10

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #21856 by jeffcj
mindstorm wrote:

Installed and activated. When I go to options i get the following:

Fatal error: Call to undefined function hikashop_get() in /home/masilun/public_html/showernichekit.com/plugins/hikashopshipping/usps.php on line 330

Any ideas?


What version of HikaShop? The code in question (line 230) is
Code:
$this->currency = hikashop_get('type.currency');
. That came directly from the existing Australian Post plugin.

Ah, I found this post by Nicolas regarding a similar issue:

It should be $class = hikashop::get('class.category'); and not $class = hikashop_get('class.category'); if you use a version of HikaShop prior to 1.5.2


Upgrading to the latest version of Hikashop should solve that problem. My apologies, I wasn't aware of that change and didn't have any "old" versions of HikaShop to test against. If you are unable to upgrade, I should be able to adjust the code to take the version into account.


Like my work? Click here to donate.

Your support is appreciated and helps keep me motivated to continue writing code.
The following user(s) said Thank You: brayden10

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #21860 by nicolas
Indeed. That's the problem. Upgrading will solve the problem. Alternatively, replacing all the hikashop_ by hikashop:: in the usps plugin files should also solve the problem.
The following user(s) said Thank You: brayden10

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #21906 by hanskleinert
Hi, I installed and configured the USPS plug in. Thanks for that.
I am getting:
1. "No shipping methods available to your location at" check out

2. on an another installation with same stage of integration I am getting: "USPS error: 80040b1a Authorization failure. You are not authorized to connect to this server." and "Failed to obtain shipping quotes." at check out

please assist, Thanks
The following user(s) said Thank You: brayden10

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #21907 by nicolas
Hi,

For the first error, it's probably because you set a zone in the shipping plugin while your address is not in that zone.

For the 80040b1a Authorization failure error, it's because you need to sign up for a USPS Webtools account as it will not work with a normal USPS account:
faq.shopfactory.com/kb/article-715.html
The following user(s) said Thank You: brayden10

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #21908 by hanskleinert
Hi, you are right in second error case. It went now in same error category than first error.
I obtained an account number to the USPS test server and applied to be transferred to the production server.
Does this cover the problem? Thanks
The following user(s) said Thank You: brayden10

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #21909 by nicolas
No. For first error, you need to delete the zone you set in the usps plugin options and try again.
The following user(s) said Thank You: brayden10

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #21910 by hanskleinert
sorry, wrong information: first error went to be like the second error, Both installations are now:
"USPS error: 80040b1a Authorization failure. You are not authorized to connect to this server.
Failed to obtain shipping quotes."
The following user(s) said Thank You: brayden10

Please Log in or Create an account to join the conversation.

Time to create page: 0.501 seconds
Powered by Kunena Forum