Post by JeffroDH » Thu Jun 18, 2015 2:52 am

sistawig wrote:I think the reason for my error was this:

<code>$cost = 2 + $postage->getElementsByTagName('Rate')->item(0)->nodeValue;</code>

I was adding $2 above the shipping to charge automatic fees on shipping. When i removed the 2+ and reenabled the xml it worked
That might be a type mismatch. Try this:

Code: Select all

$cost = $postage->getElementsByTagName('Rate')->item(0)->nodeValue;
$cost = (int)$cost + 2;
You may need to add it in a few different places in order to ensure that it happens consistently between domestic and international shipping.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by JeffroDH » Thu Jun 18, 2015 2:57 am

Ok everyone, I've gone over the code twice more and can't replicate any issues using the latest version of my VQMod.

If you're having problems, post your logs up here and I'll see what I can do.

FYI, I'm going on vacation for a couple of weeks starting tomorrow morning, and I may not be able to respond as quickly to your issues. I'll check in if I get a notification, but probably won't immediately be able to stop and code wherever I'm at.

As always, for the fastest service, include your OC version, and copies of your VQMod and OC error logs. Turning on debug mode in the USPS module so I can take a look at the XML request/response is also helpful.

Cheers!

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by ross_badger » Thu Jun 18, 2015 9:11 am

Jeff and all:

I found the issue! After my new install of OC 2.0.3.1, I forgot to run the VQMOD installer again....(i.e. http://www.yoursite.com/vqmod/install). Once I did this, the USPS API Update extension is working again, with the correct Canada postage AND with the online prices.

Whew!

I hope this helps others that have had this issue.

Ross

Newbie

Posts

Joined
Wed Dec 10, 2014 9:26 am

Post by JeffroDH » Thu Jun 18, 2015 4:37 pm

ross_badger wrote:Jeff and all:

I found the issue! After my new install of OC 2.0.3.1, I forgot to run the VQMOD installer again....(i.e. http://www.yoursite.com/vqmod/install). Once I did this, the USPS API Update extension is working again, with the correct Canada postage AND with the online prices.

Whew!

I hope this helps others that have had this issue.

Ross
Glad it was something simple. Have a great weekend.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by vdm » Tue Jun 23, 2015 4:35 am

Didn't realize that this extension doesn't factor dimensions or max weight.
That leaves me with a huge problem that makes this completely unusable (unless I'm missing something, which hopefully I am).

We ship using USPS priority mail.
We have a product that weighs 8lbs and has dimensions of 18"x14"x8".
If a customer orders 2 of these products, they would require to be shipped in 2 separate boxes.
Currently, USPS returns virtually identical Priority rate for 2 of these items as they do for 1.
This means that USPS is assuming that both items can fit in 1 box (which, obviously, they can't).

Please tell me that there is a solution for this issue, otherwise, it's not usable.

vdm
Newbie

Posts

Joined
Sun Jun 24, 2012 8:55 pm

Post by JeffroDH » Wed Jun 24, 2015 1:17 am

vdm wrote:Didn't realize that this extension doesn't factor dimensions or max weight.
That leaves me with a huge problem that makes this completely unusable (unless I'm missing something, which hopefully I am).

We ship using USPS priority mail.
We have a product that weighs 8lbs and has dimensions of 18"x14"x8".
If a customer orders 2 of these products, they would require to be shipped in 2 separate boxes.
Currently, USPS returns virtually identical Priority rate for 2 of these items as they do for 1.
This means that USPS is assuming that both items can fit in 1 box (which, obviously, they can't).

Please tell me that there is a solution for this issue, otherwise, it's not usable.
There is a solution for this issue, but it is not included in this extension. This extension merely keeps opencart's implementation up to date with USPS API upgrades. It doesn't add any new functionality of the sort that you require.

The USPS API won't return a quote for an item if the shipping weight is greater than the allowed weight for a particular method, but it doesn't deal with package size very well.

You might try enforcing a maximum order on each item, or there are other shipping extensions that deal with the box packing problem (which is very complex, as you might imagine.) Some fully featured extensions will allow you to select shipping options per item, allowing much greater granularity if you're shipping a wide variety of items.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by vdm » Wed Jun 24, 2015 2:21 am

JeffroDH wrote:
vdm wrote:Didn't realize that this extension doesn't factor dimensions or max weight.
That leaves me with a huge problem that makes this completely unusable (unless I'm missing something, which hopefully I am).

We ship using USPS priority mail.
We have a product that weighs 8lbs and has dimensions of 18"x14"x8".
If a customer orders 2 of these products, they would require to be shipped in 2 separate boxes.
Currently, USPS returns virtually identical Priority rate for 2 of these items as they do for 1.
This means that USPS is assuming that both items can fit in 1 box (which, obviously, they can't).

Please tell me that there is a solution for this issue, otherwise, it's not usable.
There is a solution for this issue, but it is not included in this extension. This extension merely keeps opencart's implementation up to date with USPS API upgrades. It doesn't add any new functionality of the sort that you require.

The USPS API won't return a quote for an item if the shipping weight is greater than the allowed weight for a particular method, but it doesn't deal with package size very well.

You might try enforcing a maximum order on each item, or there are other shipping extensions that deal with the box packing problem (which is very complex, as you might imagine.) Some fully featured extensions will allow you to select shipping options per item, allowing much greater granularity if you're shipping a wide variety of items.
Thanks! Actually figured out that the issue had nothing to due with multiple packages.
Seems it's doing what it's supposed to do :)

vdm
Newbie

Posts

Joined
Sun Jun 24, 2012 8:55 pm

Post by shamanicconnection » Tue Jun 30, 2015 7:02 am

shamanicconnection wrote:Thank you for taking the time to review my modifications and to modify the code to suit my wants. I definitely appreciate your assistance. It works beautifully, even if it's not pretty ;D

It's nice to let customers know how long the different shipping methods are expected to take.

For anyone else who is looking to display a rough estimate on shipping times (other than what is given by the Post Office), here is what we did to modify the xml file:

After "$result = str_replace(' 2-3 Days', '', $result);" (about line 25) insert:

Code: Select all

//The next 4 lines search for the service names, and replace them with the modified version
            $result = str_replace('Priority Mail&#8482;', 'Priority Mail&#8482; (2-3 Days)', $result);
            $result = str_replace('Priority Mail Express&#8482;', 'Priority Mail Express&#8482; (1-3 Days)', $result);
            $result = str_replace('Standard Post&#174;', 'Standard Post&#174; (2-9 Days)', $result);
            $result = str_replace('First-Class Mail&#174; Parcel;', 'First-Class Mail&#174; (2-5 Days)', $result);]]>
Then again around line 72 (just before <file name="admin/language/english/shipping/usps.php" error="log">) add:

Code: Select all

<!-- Optional Code for adding shipping estimates to First Class methods -->        
        <operation>
           <search position="after" offset="13"><![CDATA[} elseif ($this->config->get('usps_domestic_' . $classid)) {]]></search>
           <add><![CDATA[                                 if($quote_data[$classid]['title'] == 'First-Class Mail&#174; Parcel') {
                                    $quote_data[$classid]['title'] = 'First-Class Mail&#174; Parcel (2-5 Days)';
                                 }]]></add>
        </operation>
        <operation>
           <search position="after" offset="13"><![CDATA[if (($this->config->get('usps_domestic_' . $classid))) {]]></search>
           <add><![CDATA[                                 if($quote_data[$classid]['title'] == 'First-Class Mail&#174; Parcel') {
                                    $quote_data[$classid]['title'] = 'First-Class Mail&#174; Parcel (2-5 Days)';
                                 }]]></add>
        </operation>
Thanks again- Debbie
After the new update for 2015, all my pretty estimates of shipping time went away, and I can't quite retrieve them. I tried adding the pieces we put together some time back (see above), but no luck. I tried adding these items at line 55 & 141 and am just getting the <sup> where the estimate should be. When you get a time to look at this I'd appreciate the help.

Thanks
Debbie


Posts

Joined
Tue Nov 25, 2014 2:15 am

Post by johnblood » Thu Jul 02, 2015 1:03 am

I just installed the extension. When I tried to place a test order from Ontario, Canada, I got an error this error: The element 'IntlRateV2Request' has invalid child element 'Revision'. List of possible elements expected: 'RateClientType, Package'.. I retried in debug mode and got the following:

Code: Select all

2015-07-01 9:59:10 - USPS DATA SENT: API=IntlRateV2&XML=<IntlRateV2Request USERID="981TLDMI4886"><Revision>2</Revision> <Revision>2</Revision>	<Package ID="1">		<Pounds>4</Pounds>		<Ounces>6.88</Ounces>		<MailType>All</MailType>		<GXG>		  <POBoxFlag>N</POBoxFlag>		  <GiftFlag>N</GiftFlag>		</GXG>		<ValueOfContents>20</ValueOfContents>		<Country>Canada</Country>		<Container>RECTANGULAR</Container>		<Size>REGULAR</Size>		<Width>3</Width>		<Length>4</Length>		<Height>2</Height>		<Girth></Girth>      <OriginZip>49512</OriginZip>		<OriginZip>49512</OriginZip>		<CommercialFlag>Y</CommercialFlag>      <AcceptanceDateTime>2015-07-01T09:59:10-07:00</AcceptanceDateTime>		<DestinationPostalCode>p1a2p6</DestinationPostalCode>	</Package></IntlRateV2Request>
2015-07-01 9:59:10 - USPS DATA RECV: <?xml version="1.0" encoding="UTF-8"?>
<Error><Number>-2147221202</Number><Source>Common:XmlParse</Source><Description>The element 'IntlRateV2Request' has invalid child element 'Revision'. List of possible elements expected: 'RateClientType, Package'.</Description><HelpFile/><HelpContext/></Error>
I'm running 2.0.2.0. My url is http://www.tldm.org/store. Before I installed the the update, shipping was computed for a bunch of foreign countries, like UK, South Africa, and Ne Brunswick Canada. Now, I just get an error. Any ideas? I need help quickly because some of my best customers come from outside the US. Thanks in advance.

Newbie

Posts

Joined
Fri Apr 17, 2015 2:07 am

Post by johnblood » Sat Jul 11, 2015 12:03 am

I'm a little frustrated because I posted about a week ago and I still have not received any answer about my problem. My foreign customers cannot order and I'm losing business. I would appreciate any help.

Newbie

Posts

Joined
Fri Apr 17, 2015 2:07 am

Post by JeffroDH » Sun Jul 12, 2015 7:28 am

johnblood wrote:I'm a little frustrated because I posted about a week ago and I still have not received any answer about my problem. My foreign customers cannot order and I'm losing business. I would appreciate any help.
Sorry about the delay. I've been on vacation.

In order to provide support, I need your OC version, OpenCart error logs, and your VQMod error logs (/vqmod/logs/).

Edit: Also, please be sure to read the first post in this thread. The troubleshooting steps detailed there can solve a LOT of problems right out of the gate. It sounds like you've got a file that's been modified somewhere and the mod is aborting before it is able to make all the changes that need to be made. Again, sincerest apologies for the delay. If you want to PM me with ftp and admin credentials, I can log in and take a look quickly.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by JeffroDH » Sun Jul 12, 2015 7:42 am

shamanicconnection wrote:
shamanicconnection wrote:Thank you for taking the time to review my modifications and to modify the code to suit my wants. I definitely appreciate your assistance. It works beautifully, even if it's not pretty ;D

It's nice to let customers know how long the different shipping methods are expected to take.

For anyone else who is looking to display a rough estimate on shipping times (other than what is given by the Post Office), here is what we did to modify the xml file:

After "$result = str_replace(' 2-3 Days', '', $result);" (about line 25) insert:

Code: Select all

//The next 4 lines search for the service names, and replace them with the modified version
            $result = str_replace('Priority Mail&#8482;', 'Priority Mail&#8482; (2-3 Days)', $result);
            $result = str_replace('Priority Mail Express&#8482;', 'Priority Mail Express&#8482; (1-3 Days)', $result);
            $result = str_replace('Standard Post&#174;', 'Standard Post&#174; (2-9 Days)', $result);
            $result = str_replace('First-Class Mail&#174; Parcel;', 'First-Class Mail&#174; (2-5 Days)', $result);]]>
Then again around line 72 (just before <file name="admin/language/english/shipping/usps.php" error="log">) add:

Code: Select all

<!-- Optional Code for adding shipping estimates to First Class methods -->        
        <operation>
           <search position="after" offset="13"><![CDATA[} elseif ($this->config->get('usps_domestic_' . $classid)) {]]></search>
           <add><![CDATA[                                 if($quote_data[$classid]['title'] == 'First-Class Mail&#174; Parcel') {
                                    $quote_data[$classid]['title'] = 'First-Class Mail&#174; Parcel (2-5 Days)';
                                 }]]></add>
        </operation>
        <operation>
           <search position="after" offset="13"><![CDATA[if (($this->config->get('usps_domestic_' . $classid))) {]]></search>
           <add><![CDATA[                                 if($quote_data[$classid]['title'] == 'First-Class Mail&#174; Parcel') {
                                    $quote_data[$classid]['title'] = 'First-Class Mail&#174; Parcel (2-5 Days)';
                                 }]]></add>
        </operation>
Thanks again- Debbie
After the new update for 2015, all my pretty estimates of shipping time went away, and I can't quite retrieve them. I tried adding the pieces we put together some time back (see above), but no luck. I tried adding these items at line 55 & 141 and am just getting the <sup> where the estimate should be. When you get a time to look at this I'd appreciate the help.

Thanks
Debbie
Debbie,

I'm sorry that it's not been working for you. Send me a PM with ftp and admin login credentials (it's best to set up some temporary credentials), and I'll patch it back up for you. Quick tip: Save this file when a new version comes out so that you can easily compare the two and add the pertinent lines back in.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by adilbhatofficial » Sun Jul 12, 2015 5:00 pm

i just pm you did you check that ??

adilbhatofficial@gmail.com


Posts

Joined
Mon Mar 23, 2015 3:08 pm

Post by JeffroDH » Tue Jul 14, 2015 5:13 am

adilbhatofficial wrote:i just pm you did you check that ??
adilbhatofficial@gmail.com
I'm not generally up at 3 in the morning, but we did get this issue sorted. Users be aware: the owner of the domain paid adilbhatofficial $65 via fiverr to deal with an issue that I could have solved either for free or for ~$20. This was partially my fault as I was slow to respond to the request while on vacation. Please read the first post in the thread thoroughly as it deals with the most common issues people have with this extension. Not knocking fiverr, but this guy got paid $65 to come on this forum and ask me to do the work.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by tchandler52 » Fri Jul 17, 2015 1:26 pm

Hello all,

I Just purchase this extension. How do I change the shipping price back to the regular prices instead of the cheap prices ?

Thanks

Newbie

Posts

Joined
Fri Jul 17, 2015 1:23 pm

Post by JeffroDH » Fri Jul 17, 2015 10:35 pm

tchandler52 wrote:Hello all,

I Just purchase this extension. How do I change the shipping price back to the regular prices instead of the cheap prices ?

Thanks
Change

Code: Select all

$xml .= ' <Service>ONLINE</Service>';
 
TO:

Code: Select all

$xml .= ' <Service>ALL</Service>';

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by SalaMods » Sat Jul 25, 2015 12:26 pm

Hello,

I am new to opencart and have tried to follow the instructions in your Readme, as best as I could. I have gotten VQMod to install, but have not been able to install this plugin. I had purchased this last night, and it is one of the final things i need working to make my site live.

Thanks in advance for the help.

PS.. My Current USPS Error that I am getting is:

"United States Postal Service

This Software version is no longer supported. You must go to the SA web site (www.uspswebtools.com/Shippingassistant) and download the latest version of the Shipping Assistant."

Newbie

Posts

Joined
Sat Jul 25, 2015 12:23 pm

Post by JeffroDH » Sun Jul 26, 2015 2:47 am

SalaMods wrote:Hello,

I am new to opencart and have tried to follow the instructions in your Readme, as best as I could. I have gotten VQMod to install, but have not been able to install this plugin. I had purchased this last night, and it is one of the final things i need working to make my site live.

Thanks in advance for the help.

PS.. My Current USPS Error that I am getting is:

"United States Postal Service

This Software version is no longer supported. You must go to the SA web site (http://www.uspswebtools.com/Shippingassistant) and download the latest version of the Shipping Assistant."
Shipping Assistant is an anachronistic name for the Click N Ship desktop application. That has nothing to do with my extension.

Please read the first post on this thread and post the required information.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by tydir5 » Tue Aug 04, 2015 6:59 am

The Handling fee ONLY applies to the First Class Mail. Does anyone know how do I make the handling fee apply to all the other USPS mail services e.g. Priority, Express, etc?
Thanks!

Newbie

Posts

Joined
Wed Oct 23, 2013 10:37 am

Post by JeffroDH » Tue Aug 04, 2015 7:26 am

tydir5 wrote:The Handling fee ONLY applies to the First Class Mail. Does anyone know how do I make the handling fee apply to all the other USPS mail services e.g. Priority, Express, etc?
Thanks!
Handling fees aren't currently a part of this extension. I will have a solution for this problem in the near future, however.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am
Who is online

Users browsing this forum: No registered users and 9 guests