Post by CharmersVine99 » Tue Apr 07, 2015 1:15 am

That is correct. When I go to admin interface > extensions > shipping > United postal service shipping (the one pre-installed w/ OC2) > edit
My options for domestic services listed are:
First-Class Mail Parcel
First-Class Mail Large Envelope
First-Class Mail Letter
First-Class Mail Postcards
Priority Mail
Express Mail Hold for Pickup
Express Mail
Parcel Post
Bound Printed Matter
Media Mail
Library
First-Class Postcard Stamped
Express Mail Flat-Rate Envelope
Priority Mail Flat-Rate Envelope
Priority Mail Regular Flat-Rate Box
Priority Mail Keys and IDs
First-Class Keys and IDs
Priority Mail Flat-Rate Large Box
Express Mail Sunday/Holiday
Express Mail Flat-Rate Envelope Sunday/Holiday
Express Mail Flat-Rate Envelope Hold For Pickup
Priority Mail Small Flat-Rate Box
The Regional boxes that I see it pulling in the log file is not listed. Are there any other settings I may be missing?
Thank you.


Posts

Joined
Sat Apr 04, 2015 1:50 am

Post by CharmersVine99 » Tue Apr 07, 2015 2:57 am

Issue Fixed! :)

I didn't realize that admin/...... was hard coded into the vqmod xml file.
I changed my admin folder name for security. So I just did a find all "admin/" and replace with "[myadminfoldername]/"
And now it works like a charm.
Thanks!


Posts

Joined
Sat Apr 04, 2015 1:50 am

Post by JeffroDH » Tue Apr 07, 2015 4:12 am

Thanks for getting back with me! I'll see about updating the files so that it uses a dynamic reference to the administration section, and at least include that information in a README file.

You had me scratching my head.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by CharmersVine99 » Tue Apr 07, 2015 8:57 am

Thanks for the extension.

You know what would be great though is a way to just push a button to generate a shipping label :)


Posts

Joined
Sat Apr 04, 2015 1:50 am

Post by JeffroDH » Tue Apr 07, 2015 11:07 am

That would be awesome. Last I checked USPS had licensed that out to some fairly big companies. If have to incorporate Pitney Bowes or stamps.com or something.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by pixelmaker » Wed Apr 22, 2015 5:29 am

Hello,
I just bought this extension and it installed just fine but displays all of the options instead of just the correct options. It also is sorting by the highest price on top to lowest price on the bottom instead of the other way around.

It's basically not picking the correct shipping option.. just displaying all the options that I've made active.

Please let me know how I can fix this ASAP!

My site: hoolono.com

My Opencart: 1.5.5.1

Thank you!! - Ken Elkins

Newbie

Posts

Joined
Sun Feb 23, 2014 6:16 am

Post by JeffroDH » Tue Apr 28, 2015 11:53 pm

Ken, I sent you a PM in response to your PM.

You're not getting a response from USPS because your username is incorrect. Double check your info from usps and correct it in the admin panel.

Also, there is an issue with your version of /catalog/model/shipping/USPS.php that is causing the mod to abort. Again, refer to the instructions I sent in the PM.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by ddcarobs » Wed May 13, 2015 4:47 am

Hi Jeff,
I installed this with no problem. It added all the new rates. My issues is with international shipping. When I put in a Canada zip to estimate shipping it says "No shipping options are available" I will attach the error logs from Opencart below, but where do i get the error logs from the xml?

Attachments

usps error logs.png

usps error logs - usps error logs.png (62.68 KiB) Viewed 4440 times


Newbie

Posts

Joined
Thu Dec 11, 2014 2:23 am

Post by JeffroDH » Thu May 14, 2015 6:16 am

You may not have any shipping options selected that are international, but I'll need the logs to be sure. The VQMod logs are in /vqmod/logs, and are organized by date. If there is a problem, the same block of code will be repeated with different timestamps. I'll only need to see one.

Also, with the OC error logs, I need the full text rather than a screenshot. The view you captured only shows about %30 of the log. You can copy the text directly from the window.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by shamanicconnection » Mon May 25, 2015 6:53 am

JeffroDH,

Will we have a new update ready for the postage changes that take effect next Sunday, 5/31? I can't find any reference on the board.

Thanks
Debbie


Posts

Joined
Tue Nov 25, 2014 2:15 am

Post by JeffroDH » Mon May 25, 2015 10:54 am

Thanks for your inquiry. I've gone over the changes, and as far as I can tell, no update will be necessary.

I'll be running tests on their test server this week, and if something comes up, an update will be published. (And I'll make sure that OC sends an email notification to those with a license.)

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by shamanicconnection » Thu May 28, 2015 12:39 pm

Thanks.


Posts

Joined
Tue Nov 25, 2014 2:15 am

Post by datasupply » Thu Jun 04, 2015 1:25 pm

It appears that the mod is having an issue with International Shipping to Canada (Canada is the only country I've tested as it's the only country the client ships to). Domestics seems to be fine, but international breaks. I'm fairly sure it's due to the changes USPS made on May 31, 2015.

Can you test this in your mod and let me know what info you need to help troubleshoot it.

Thanks

Newbie

Posts

Joined
Thu Jun 04, 2015 1:21 pm

Post by sistawig » Fri Jun 05, 2015 5:48 am

Hello,

I bought your extension but whenever i try to access canada's address to get rates it is giving. This error started from may 31,2015 that is the reason why i thought it was api issue so bought your extension.

United Parcel Service
UPS Standard - $25.06

United States Postal Service
(Estimated Time: ) - $0.00


Opencart Error Logs(Repeated multiple times):

2015-06-04 16:26:24 - PHP Notice: Trying to get property of non-object in /home/sistawig/public_html/catalog/model/shipping/usps.php on line 428 url: /index.php?route=checkout/shipping/quote referal: http://www.sistawigs.com/index.php?route=checkout/cart Array
(
[country_id] => 38
[zone_id] => 610
[postcode] => N0M0C2
)



The USPS extension was already installed so i just dropped your xml file in vqmod/xml folder. I see nothing changed or no place to install your extension.

please help with this installation.

New member

Posts

Joined
Tue Nov 25, 2014 1:37 am

Post by JeffroDH » Fri Jun 05, 2015 6:17 am

I need to know which version of OC you're using, as well as a copy of the VQMod error logs.

Also, it would be helpful to know if the php error began on May 31 as well, or if it began after you installed my VQmod.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by henkster » Fri Jun 05, 2015 7:32 am

I have the same issue. Started on May 31st.

USPS Priority Mail to Canada now requires the origin zip and this isn't being passed in the USPS shipping extension. I've two site running v1.5.1.3 and v2.0.2.0, both are affected in the same way.

There are no errors in the vqmod error logs but the main error log has 2 errors in it:
2015-06-04 19:33:02 - PHP Notice: Trying to get property of non-object in /home/xxxxx/public_html/system/modification/catalog/model/shipping/usps.php on line 441
2015-06-04 19:33:02 - PHP Notice: Trying to get property of non-object in /home/xxxxx/public_html/system/modification/catalog/model/shipping/usps.php on line 444

Newbie

Posts

Joined
Wed Jul 13, 2011 5:34 am

Post by henkster » Fri Jun 05, 2015 1:06 pm

Right, I've got a fix. In catalog/model/shipping/usps.php two additional fields are needed in the API request

After (line 282):

Code: Select all

				if (isset($country[$address['iso_code_2']])) {
					$xml  = '<IntlRateV2Request USERID="' . $this->config->get('usps_priority_user_id') . '">';
insert

Code: Select all

					$xml .=	' <Revision>2</Revision>';
and after (line 305ish):

Code: Select all

$xml .= '		<Girth>' . $this->config->get('usps_girth') . '</Girth>';
insert

Code: Select all

$xml .=	'		<OriginZip>' . substr($this->config->get('usps_postcode'), 0, 5) . '</OriginZip>';
Works a treat for me.

Newbie

Posts

Joined
Wed Jul 13, 2011 5:34 am

Post by hcamelion » Fri Jun 05, 2015 1:31 pm

We came across an issue with the zip not being passed. I did not have time to read recent posts in this thread but it seems some people (henkster) are already responding to this issue. We fixed it this way with a new vqmod as follows but we also added a fix to check for a service error which I think should be added because it was causing an empty shipping method for $0.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<modification>
    <id>USPS International Rates Shipping Price Calculation fix</id>
    <version>1.0.0</version>
    <vqmver>1.0.0</vqmver>
    <author>Weismann Web</author>
    <info>Fixes to USPS International Rates Calculation as per Revision 2</info>
    <file name="catalog/model/shipping/usps.php" error="log">
    	<operation>
    		<search position="after"><![CDATA[$xml  = '<IntlRateV2Request USERID="' . $this->config->get('usps_user_id') . '">';]]></search>
    		<add><![CDATA[$xml .=	'	<Revision>2</Revision>';]]></add>
    	</operation>
    	<operation>
    		<search position="replace"><![CDATA[$xml .=	'		  <POBoxFlag>N</POBoxFlag>';]]></search>
    		<add><![CDATA[$xml .=	'		  <POBoxFlag>Y</POBoxFlag>';]]></add>
    	</operation>
    	<operation>
    		<search position="before"><![CDATA[$xml .= '		<CommercialFlag>N</CommercialFlag>';]]></search>
    		<add><![CDATA[$xml .=	'		<OriginZip>' . substr($this->config->get('usps_postcode'), 0, 5) . '</OriginZip>';]]></add>
    	</operation>
    	<operation>
    		<search position="after"><![CDATA[$xml .= '		<CommercialFlag>N</CommercialFlag>';]]></search>
    		<add><![CDATA[$xml .= '		<AcceptanceDateTime>'.date('c').'</AcceptanceDateTime>';
                    $xml .=	'		<DestinationPostalCode>' . $postcode . '</DestinationPostalCode>';]]></add>
    	</operation>
    	<operation>
    		<search position="after"><![CDATA[foreach ($services as $service) {]]></search>
    		<add><![CDATA[$error = $service->getElementsByTagName('ServiceError')->item(0);
                if ($error) {
                	$method_data = array(
                		'code'       => 'usps',
                		'title'      => $this->language->get('text_title'),
                		'quote'      => $quote_data,
                		'sort_order' => $this->config->get('usps_sort_order'),
                		'error'      => $error->getElementsByTagName('Description')->item(0)->nodeValue
                	);
                    break;
                }]]></add>
    	</operation>
    </file>
</modification>

Henry Weismann
877.44.MY.WEB (877.446.9932)
We can help with your Opencart Site - Opencart Web Developer

Image


User avatar
New member

Posts

Joined
Mon Jul 27, 2009 3:14 am
Location - Albany, NY, USA

Post by JeffroDH » Fri Jun 05, 2015 2:05 pm

hcamelion wrote:We came across an issue with the zip not being passed. I did not have time to read recent posts in this thread but it seems some people (henkster) are already responding to this issue. We fixed it this way with a new vqmod as follows but we also added a fix to check for a service error which I think should be added because it was causing an empty shipping method for $0.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<modification>
    <id>USPS International Rates Shipping Price Calculation fix</id>
    <version>1.0.0</version>
    <vqmver>1.0.0</vqmver>
    <author>Weismann Web</author>
    <info>Fixes to USPS International Rates Calculation as per Revision 2</info>
    <file name="catalog/model/shipping/usps.php" error="log">
    	<operation>
    		<search position="after"><![CDATA[$xml  = '<IntlRateV2Request USERID="' . $this->config->get('usps_user_id') . '">';]]></search>
    		<add><![CDATA[$xml .=	'	<Revision>2</Revision>';]]></add>
    	</operation>
    	<operation>
    		<search position="replace"><![CDATA[$xml .=	'		  <POBoxFlag>N</POBoxFlag>';]]></search>
    		<add><![CDATA[$xml .=	'		  <POBoxFlag>Y</POBoxFlag>';]]></add>
    	</operation>
    	<operation>
    		<search position="before"><![CDATA[$xml .= '		<CommercialFlag>N</CommercialFlag>';]]></search>
    		<add><![CDATA[$xml .=	'		<OriginZip>' . substr($this->config->get('usps_postcode'), 0, 5) . '</OriginZip>';]]></add>
    	</operation>
    	<operation>
    		<search position="after"><![CDATA[$xml .= '		<CommercialFlag>N</CommercialFlag>';]]></search>
    		<add><![CDATA[$xml .= '		<AcceptanceDateTime>'.date('c').'</AcceptanceDateTime>';
                    $xml .=	'		<DestinationPostalCode>' . $postcode . '</DestinationPostalCode>';]]></add>
    	</operation>
    	<operation>
    		<search position="after"><![CDATA[foreach ($services as $service) {]]></search>
    		<add><![CDATA[$error = $service->getElementsByTagName('ServiceError')->item(0);
                if ($error) {
                	$method_data = array(
                		'code'       => 'usps',
                		'title'      => $this->language->get('text_title'),
                		'quote'      => $quote_data,
                		'sort_order' => $this->config->get('usps_sort_order'),
                		'error'      => $error->getElementsByTagName('Description')->item(0)->nodeValue
                	);
                    break;
                }]]></add>
    	</operation>
    </file>
</modification>
Well, it's rather embarrassing, as the developer to miss something like that in the release notes. I've got the ZIP code issue sorted, and will be pushing a new release as soon as it's tested on 1.5.x and 2.0. I'll have a look at the code you posted and see about adding an implementation of it into the mod for error checking.

EDIT: After looking at this a bit, I don't think the error checking code is necessary... If the request is made properly, then there will be no service error, and no 0.00 postage element. Filing this away for further thought when it's not 1AM.
Last edited by JeffroDH on Fri Jun 05, 2015 2:39 pm, edited 1 time in total.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by hcamelion » Fri Jun 05, 2015 2:30 pm

RE: Also, is anyone else running into an error involving the <CommercialFlag> or <CommercialPlusFlag> tag? It's popping as an invalid tag on my installation. Odd, since it's in the documentation.

Maybe you are not setting the right revision/api version? That is just off the cuff.

Henry Weismann
877.44.MY.WEB (877.446.9932)
We can help with your Opencart Site - Opencart Web Developer

Image


User avatar
New member

Posts

Joined
Mon Jul 27, 2009 3:14 am
Location - Albany, NY, USA
Who is online

Users browsing this forum: No registered users and 21 guests