Post by markz » Thu Oct 24, 2013 9:23 pm

Weird...the fix isn't working for me. I've double checked my modifications to code and it appears correct. I'm still getting an error message, however, and no First Class Mail option. I'm using opencart v.1.5.6.

v.3.0.2.0
-------------
also v.1.5.6
with vqmod 2.5.1


Active Member

Posts

Joined
Mon Aug 19, 2013 8:14 am

Post by butte » Fri Oct 25, 2013 4:16 am

Sounds as though you did it by hand -- you might try one of the .xml for that (revert hand-edited files to backups or pull them back out of OC .zip /upload/ tree.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by markz » Fri Oct 25, 2013 4:48 am

I did do it by hand, and just reinstalled a backup (from the OC/.zip/upload/tree) to catalog/model/shipping/usps.php.

I'm also trying to work with the VQMod - USPS <sup> Fix Extension...that's supposed to be placed in siteroot/VQMod/xml, correct?

v.3.0.2.0
-------------
also v.1.5.6
with vqmod 2.5.1


Active Member

Posts

Joined
Mon Aug 19, 2013 8:14 am

Post by butte » Fri Oct 25, 2013 8:46 am

Yes, assuming that it is a .xml file and standalone (only one file to upload).

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by markz » Fri Nov 01, 2013 12:11 am

Okay, I've got the VQMod - USPS <sup> Fix Extension installed, but for some reason I don't understand yet, my usps.php file keeps being aborted.

I copied then edited the code as per the instructions in this thread, to the usps.php file, using Notepad+ +

Then I uploaded and overwrote the original file in catalog/model/shipping/usps.php

File Name: catalog/model/shipping/usps.php(0)
VQModObject::applyMod - SEARCH NOT FOUND (ABORTING MOD): &reg;<

v.3.0.2.0
-------------
also v.1.5.6
with vqmod 2.5.1


Active Member

Posts

Joined
Mon Aug 19, 2013 8:14 am

Post by Cue4cheap » Fri Nov 01, 2013 5:55 am

Sounds like it is missing stuff:
You have:
&reg;<
and it should be:
&amp;reg;&lt;

Mike

cue4cheap not cheap quality


Expert Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by butte » Fri Nov 01, 2013 1:40 pm

Is there even a slight version mismatch? The vqmod file looks for specifics to match and then substitutes for those, and even a faint difference from the expected will be a mismatch. Even a mere typo will cause that.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by markz » Sat Nov 02, 2013 1:22 am

I copied the usps.php file before editing it in Notepad+ +. I also have a copy of the original in my downloaded copy of OC.

I've tried a number of things now, a number of times, such as editing the .php file directly via the file manager at my host site, editing in Notepad+ + offline then uploading, copying and pasting the two lines of changed code from this thread into the .php file via Notepad+ +, etc.

It appears only two lines of code have to be changed, correct?

In the original usps.php file these lines

$result = str_replace('&lt;sup&gt;&amp;reg;&lt;/sup&gt;', '', $result);
$result = str_replace('&lt;sup&gt;&amp;trade;&lt;/sup&gt;', '', $result);

are replaced with these two lines...

$result = str_replace('&lt;sup&gt;&#174;&lt;/sup&gt;', '', $result);
$result = str_replace('&lt;sup&gt;&#8482;&lt;/sup&gt;', '', $result);

The difference I am seeing in the first line is that

amp;reg;

is replaced with

#174;

And in the second line

amp;trade;

is replaced with

#8482;

v.3.0.2.0
-------------
also v.1.5.6
with vqmod 2.5.1


Active Member

Posts

Joined
Mon Aug 19, 2013 8:14 am

Post by markz » Sat Nov 02, 2013 11:59 pm

What permissions should the usps.php file have?

v.3.0.2.0
-------------
also v.1.5.6
with vqmod 2.5.1


Active Member

Posts

Joined
Mon Aug 19, 2013 8:14 am

Post by Cue4cheap » Sun Nov 03, 2013 12:13 am

markz wrote:I copied the usps.php file before editing it in Notepad+ +
Use a different editor.

cue4cheap not cheap quality


Expert Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by butte » Sun Nov 03, 2013 12:48 am

644. Directories 755, files 644, nothing 777 ("group" 2nd and "world" 3rd 7s are extreme security risks (read/write/execute), modern servers and modern code do not need 777 for publically viewale firing of files). Use a pure ascii text editor, so that NO spurious code imparts to file. There are several, crimson editor alike several others highlights code differently for different sorts of syntax (html, etc.).

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by markz » Sun Nov 03, 2013 3:17 am

I thought the usps.php file needed to be 644, which it is. I've now tried the crimson editor too as a pure ascii text editor. Am still getting the same error message.

I noticed the weight class I has used in the shipping extensions (eg kilos/grams/etc) did not match the weight class set in my store setting (systems>settings>your store>local tab) so I made them match. This didn't affect it either.

My code above does look correct though, doesn't it???...

v.3.0.2.0
-------------
also v.1.5.6
with vqmod 2.5.1


Active Member

Posts

Joined
Mon Aug 19, 2013 8:14 am

Post by butte » Sun Nov 03, 2013 9:42 am

Good on 644 and crimson. Depending upon what you're sending how, see that ounces are not used where pounds are expected. If I see another ampersand today I will suffer ampermation overload.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by markz » Sun Nov 03, 2013 11:45 am

The weight class was the culprit. Beside making the weight class match in the shipping extension and store setting, it also has to match in every product description. The usps shipping extension only allows one choice: Pound.

Therefore, the weight class in all three categories (shipping extension, store setting, product description) must be set to pound. I hope this clarifies and helps anyone else who runs into this hurdle.

Most of the items I'll be shipping weigh between 3 to 7 ounces, which means I have to translate all my products' weights into fractions of a pound. For example, 3 ounces = .1875 lb.

I'm now able to use usps first class parcel option for shipping. Thanks so much for the help!...

v.3.0.2.0
-------------
also v.1.5.6
with vqmod 2.5.1


Active Member

Posts

Joined
Mon Aug 19, 2013 8:14 am

Post by ninjatrack » Tue Jan 21, 2014 1:31 am

I have applied the fixes in this post to my files and have removed the <sup> issues. "First-Class Mail Parcel" shows up as an option for domestic mail but when I attempt to export Internationally, "First Class Mail International Parcels" does not appear as a choice. Only the Priority Mail options. I'm noticing that the Post Office has renamed the service again. On their website I can only find "First Class Package International Service" rather than "First Class Mail Parcel." If any one has had this issue, I could really use a hand. Thanks!!!

Newbie

Posts

Joined
Sun Aug 18, 2013 2:25 pm

Post by markz » Tue Jan 21, 2014 1:41 am

I think the USPS is doing some of these things intentionally, to force people to use certain services. You can still get the other services IF you go to your local p.o. and deliver in person. New postal rates go into effect in about one week, so the USPS OC shipping module may need to be modified...again. I think it's wiser to wait at this point, to see if the module will require modification to the code.

v.3.0.2.0
-------------
also v.1.5.6
with vqmod 2.5.1


Active Member

Posts

Joined
Mon Aug 19, 2013 8:14 am

Post by ocartman » Fri Jan 24, 2014 11:46 pm

Have the files for 1.5.6 updated to fix these problems?
We use first class international shipping and our sales have now been Zero since this has happened..

The problem is in the version of opencart, we have older versions that show first class international and no <sup> on the shipping.

Active Member

Posts

Joined
Fri Oct 15, 2010 12:01 am

Post by JeffroDH » Tue Jan 28, 2014 12:46 am

ninjatrack wrote:I have applied the fixes in this post to my files and have removed the <sup> issues. "First-Class Mail Parcel" shows up as an option for domestic mail but when I attempt to export Internationally, "First Class Mail International Parcels" does not appear as a choice. Only the Priority Mail options. I'm noticing that the Post Office has renamed the service again. On their website I can only find "First Class Package International Service" rather than "First Class Mail Parcel." If any one has had this issue, I could really use a hand. Thanks!!!
The information you're looking for is buried within their API documentation. They've updated the names of some of the services and tweaked some of the parameters as well. If your shop has been properly updated for the July 2013 API Update, the changes for the Jan. 2014 update will be minimal.

Shameless plug: A VQMod extension I wrote that handles the entire process. Tested very thoroughly with stock OpenCart, custom templates may need a bit of tweaking. http://www.opencart.com/index.php?route ... n_id=13043

It has been updated to support the Jan. 2014 update as well, despite the title.

Active Member

Posts

Joined
Thu Jul 11, 2013 8:29 am

Post by ocartman » Wed Jan 29, 2014 12:17 pm

Your extension is probably great but this seems to be the problem with open cart, no no updates to the core files.

Active Member

Posts

Joined
Fri Oct 15, 2010 12:01 am

Post by ninjatrack » Tue Feb 04, 2014 6:00 am

Thanks for all the replies. JeffroDH....I'm going to purchase your VQMod extenstion. Thanks for the advice.

Newbie

Posts

Joined
Sun Aug 18, 2013 2:25 pm
Who is online

Users browsing this forum: No registered users and 28 guests