United States Postal Service (USPS) Module

  • Posts: 69
  • Thank you received: 5
8 years 11 months ago #21428

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.

  • Posts: 23
  • Thank you received: 3
8 years 11 months ago #21581

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.

  • Posts: 69940
  • Thank you received: 10476
  • MODERATOR
8 years 11 months ago #21582

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.

  • Posts: 69
  • Thank you received: 5
8 years 11 months ago #21745

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.

  • Posts: 69
  • Thank you received: 5
8 years 11 months ago #21746

Last edit: 8 years 11 months ago by mindstorm.
The following user(s) said Thank You: brayden10

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

  • Posts: 69940
  • Thank you received: 10476
  • MODERATOR
8 years 11 months ago #21747

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.

  • Posts: 82
  • Thank you received: 1
8 years 11 months ago #21762

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.

  • Posts: 69940
  • Thank you received: 10476
  • MODERATOR
8 years 11 months ago #21767

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.

  • Posts: 23
  • Thank you received: 3
8 years 11 months ago #21838

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 https://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 This email address is being protected from spambots. You need JavaScript enabled to view it. that says "Hi, Please move user ID ________ to the production server. I will be using the Hikashop shopping cart."

USPS Contact Info:
E-mail: This email address is being protected from spambots. You need JavaScript enabled to view it.
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

File Attachment:

File Name: plg_hikash...usps.zip
File Size:12 KB



Like my work? Click here to donate.

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

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

  • Posts: 69940
  • Thank you received: 10476
  • MODERATOR
8 years 11 months ago #21841

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.

  • Posts: 24
  • Thank you received: 4
8 years 11 months ago #21843

Thanks Jeff, with appreciation

The following user(s) said Thank You: brayden10

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

  • Posts: 69
  • Thank you received: 5
8 years 11 months ago #21853

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.

  • Posts: 69
  • Thank you received: 5
8 years 11 months ago #21855

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.

  • Posts: 23
  • Thank you received: 3
8 years 11 months ago #21856

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
$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.

  • Posts: 69940
  • Thank you received: 10476
  • MODERATOR
8 years 11 months ago #21860

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.

  • Posts: 24
  • Thank you received: 4
8 years 11 months ago #21906

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.

  • Posts: 69940
  • Thank you received: 10476
  • MODERATOR
8 years 11 months ago #21907

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.

  • Posts: 24
  • Thank you received: 4
8 years 11 months ago #21908

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.

  • Posts: 69940
  • Thank you received: 10476
  • MODERATOR
8 years 11 months ago #21909

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.

  • Posts: 24
  • Thank you received: 4
8 years 11 months ago #21910

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.121 seconds
Powered by Kunena Forum