Post by ocartman » Wed Sep 30, 2015 4:26 am

I am using opencart 1.5.6.4 and the USPS shipping and have been having problems with it for awhile.

The pricing is too high for the options given, i have a item with a weight of 2.3 Oz that should cost $10.20 to ship international but the shipping charge is $13.70
I know opencart does not have a tare weight so not sure how to correct this, any help will be appreciated.

I selected these options for shipping service in Modules/Shipping
1. First Class Mail International Flats
2. First Class Mail International Parcels

During checkout no option for flats shows up.

Active Member

Posts

Joined
Fri Oct 15, 2010 12:01 am

Post by ocartman » Wed Sep 30, 2015 10:53 pm

I have a few sites and this one is having the problem. I think over time from updates and converting from 1.4 i have some additional files in causing the problem.
I installed the extension USPS Alternate and it shows the international option. I have both modules active.
The first one is the alternate module
The second option is stock usps module, it still has the <sup>

The stock usps module does not show First Class mail option and the copy (Altenate) does
Here is a what the options look like

Please select the preferred shipping method to use on this order.

United States Postal Service
Priority Mail Express 2-Day $31.20
Priority Mail 2-Day $7.15
First-Class Mail Parcel $3.14

United States Postal Service
Priority Mail Express 2-Day<sup>™</sup> $31.20
Priority Mail 2-Day<sup>™</sup> $7.15

Active Member

Posts

Joined
Fri Oct 15, 2010 12:01 am

Post by Cue4cheap » Fri Oct 02, 2015 10:39 am

What are your Dimensions (L x W x H): set to?

Mike

cue4cheap not cheap quality


Expert Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by ocartman » Sat Oct 03, 2015 12:13 am

Mike

They are: 12x10x.5

Dan

Active Member

Posts

Joined
Fri Oct 15, 2010 12:01 am

Post by ocartman » Sat Oct 03, 2015 12:48 am

I did a split screen with 2 versions of opencart software.
The left is OC Version 1.5.6.4
The right is OC Version 1.5.6

The first picture shows the USPS shipping Module settings that are exactly the same in both versions.
The second picture shows what displays for shipping options in the checkout screen.
OC_Ship#1.JPG

OC_Ship#1.JPG (163.17 KiB) Viewed 15623 times

OC_Ship#2.JPG

OC_Ship#2.JPG (53.69 KiB) Viewed 15623 times


This shipping is driving me crazy and need to figure this out.
Does anyone know what are all the files associated with shipping and the folders they are located in and i can delete the current ones and replace with fresh files.



Thank You,
Dan

Active Member

Posts

Joined
Fri Oct 15, 2010 12:01 am

Post by Qphoria » Sat Oct 03, 2015 2:15 am

hmm I think the "sup" thing was fixed in 1.5.6.4.. you shouldn't have that anymore.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by ocartman » Sat Oct 03, 2015 2:47 am

I replaced all the usps files in admin and controller folders with the stock Opencart files and it comes up.
Thats why i think i have old files in the folder structure and opencart is looking at these instead

Active Member

Posts

Joined
Fri Oct 15, 2010 12:01 am

Post by ocartman » Sat Oct 03, 2015 2:54 am

Here are all the shipping files i replaced.

\admin\controller\shipping\usps.php
\admin\language\english\shipping
\admin\view\template\shipping\usps.tpl
\catalog\language\english\shipping\usps.php
\catalog\model\shipping\usps.php

Am i missing any shipping file?

Thank You,
Dan
Last edited by ocartman on Sat Oct 03, 2015 9:43 pm, edited 1 time in total.

Active Member

Posts

Joined
Fri Oct 15, 2010 12:01 am

Post by ocartman » Sat Oct 03, 2015 3:00 am

I have the module USPS Altenate active now and this is what shows in the shipping now.
The first shipping options are stock opencart module
The second shipping options are the usps alt module
why do these have 2 differant options?
OC_Ship#3.JPG

OC_Ship#3.JPG (16.35 KiB) Viewed 15609 times


Active Member

Posts

Joined
Fri Oct 15, 2010 12:01 am

Post by Qphoria » Mon Oct 05, 2015 10:03 pm

Because you have both modules enabled

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by ocartman » Mon Oct 05, 2015 11:41 pm

Let me rephrase the question.

I am using opencart 1.5.6.4 and the USPS shipping does not work, i have had this problem for a long time and figured updating would correct this but has not.
Stock opencart does not show First-Class shipping options in the checkout process, what version of opencart will show first class mail options?
I added a extension to fix the problem.
I have 2 modules active in my store to check the available shipping options of stock opencart and the extension Alt usps

First module active is:
Stock Opencart module USPS

The second module active is:
USPS Shipping-Alternate (Basically a copy with some added features)

The stock opencart extension/shipping/United States Postal Service
I have selected for Domestic Services is:
1. Fisrt-Class Mail Parcel
2. Priority Mail
3. Priority Mail Flat-Rate Large Box

The add on extension/shipping/United States Postal Service (Alternate)
I have selected for Domestic Services is:
1. Fisrt-Class Mail Parcel
2. Priority Mail
3. Priority Mail Flat-Rate Large Box

Every other setting in both modules is the same.

The image shows the output in the checkout process.
The output of opencart does not show first class mail option and the alt extension shows the first class, why are the 2 differant????

Attachments

OC_Ship#5.JPG

OC_Ship#5.JPG (69.71 KiB) Viewed 15571 times


Active Member

Posts

Joined
Fri Oct 15, 2010 12:01 am

Post by Qphoria » Tue Oct 06, 2015 4:17 am

FYI there is also a LONG running USPS issue with international shipping... basically that it doesn't show international rates at all because of a bad variable. I see this all the way back through 1.5.0. Apparently nobody uses USPS to ship internationally.

There are actually 2 issues.. 1 is an actual bug. The problem is with GIRTH on international products. It points to an admin configured value that used to be a manually entered field in 1.4.9. It was changed in 1.5.x to use a calculated formula in domestic but that change was never made in the international area. So it always passes a blank girth and throws an error. So the fix there is to remove that config call which doesn't actually exist and instead use the formula.

1. FIND:

Code: Select all

$xml .= '		<Girth>' . $this->config->get('usps_girth') . '</Girth>';
2. REPLACE WITH:

Code: Select all

$xml .= '		<Girth>' . (round(((float)$this->config->get('usps_length') + (float)$this->config->get('usps_width') * 2 + (float)$this->config->get('usps_height') * 2), 1)) . '</Girth>';


The other is a conundrum. USPS Priority Int'l says it requires a postcode for shipping to Canada, but their API doesn't allow for a postcode to be entered. If you try to send the postcode the same way you send it for domestic rates, it rejects it, but if you don't send a postcode, the priority international rate shows an error message "postcode required for priority"... The problem is that the usps code expects service id 2 to be valid and blindly assumes that it will have the correct tags, but instead has an error tag. So for now the easiest option is to disable service id 2 when shipping to CA until we can figure it out.

Code: Select all

<ServiceErrors><ServiceError><Id>50050</Id><Description>The Origin ZIP Code and the Destination Postal Code is required for Priority Mail International when mailing to Canada.</Description></ServiceError></ServiceErrors></Service>
1. FIND:

Code: Select all

$allowed = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 21);
2. REPLACE WITH:

Code: Select all

if ($address['iso_code_2'] == 'CA') {
    $allowed = array(1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 21);
} else {
    $allowed = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 21);
}

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by ocartman » Tue Oct 06, 2015 9:39 pm

My rephrase of the question i actually changed to domestic shipping within the united states, sorry i will start that as a new thread.

For the international shipping, i would guess i ship 95% of packages First Class mail.
Did the USPS give you any information that no one uses the post office? I would assume they would discontinue the service if no one used it.

Have these changes to the code to make international shipping work included into a version release of opencart?

I would rather use the stock software and not a modification of files that might cause problems in the near future.

Thank you for the help.
Dan

Active Member

Posts

Joined
Fri Oct 15, 2010 12:01 am

Post by Cue4cheap » Wed Oct 07, 2015 4:46 am

My $0.02 - If Qphoria is providing you updates of what to do with your 1.5.6.4 version take them and run with them. 1.5.6.4 isn't going to be updated any further unless serious security issues are found so his input is gold.

Mike

cue4cheap not cheap quality


Expert Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by ocartman » Wed Oct 07, 2015 10:15 pm

I am sure his knowledge of how to implement missing opencart code is great, he seems to understand programming.
I am trying not to have too many changes to stock code, not sure if it is a good thing.

Maybe i should just ask what version of opencart can i download that the USPS domestic and USPS international shipping will work?

Thank You,
Dan

Active Member

Posts

Joined
Fri Oct 15, 2010 12:01 am

Post by Qphoria » Thu Oct 08, 2015 10:40 pm

ocartman wrote:My rephrase of the question i actually changed to domestic shipping within the united states, sorry i will start that as a new thread.

For the international shipping, i would guess i ship 95% of packages First Class mail.
Did the USPS give you any information that no one uses the post office? I would assume they would discontinue the service if no one used it.

Have these changes to the code to make international shipping work included into a version release of opencart?

I would rather use the stock software and not a modification of files that might cause problems in the near future.

Thank you for the help.
Dan
I meant nobody using opencart ... ::)
There won't be an official fix in the core for 1.5.x
I have not yet reported this as a bug in 2.x either (been busy)

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by ocartman » Fri Oct 09, 2015 10:23 pm

So opencart is not geared for the masses then, international shipping is popular in this day and age of internet sales.
I have 1.5 but they didnt do an upgrade path to 2.0 unless you pay for the service
No rush to V2 if the same problem is not fixed.

Active Member

Posts

Joined
Fri Oct 15, 2010 12:01 am

Post by ocartman » Fri Nov 11, 2016 10:10 pm

This shipping is enough to drive you crazy, anyone have similar problems and what module did you use or software?

Thank You

Active Member

Posts

Joined
Fri Oct 15, 2010 12:01 am

Post by rossi123 » Mon Dec 31, 2018 5:31 am

Qphoria wrote:
Tue Oct 06, 2015 4:17 am
FYI there is also a LONG running USPS issue with international shipping... basically that it doesn't show international rates at all because of a bad variable. I see this all the way back through 1.5.0. Apparently nobody uses USPS to ship internationally.

There are actually 2 issues.. 1 is an actual bug. The problem is with GIRTH on international products. It points to an admin configured value that used to be a manually entered field in 1.4.9. It was changed in 1.5.x to use a calculated formula in domestic but that change was never made in the international area. So it always passes a blank girth and throws an error. So the fix there is to remove that config call which doesn't actually exist and instead use the formula.

1. FIND:

Code: Select all

$xml .= '		<Girth>' . $this->config->get('usps_girth') . '</Girth>';
2. REPLACE WITH:

Code: Select all

$xml .= '		<Girth>' . (round(((float)$this->config->get('usps_length') + (float)$this->config->get('usps_width') * 2 + (float)$this->config->get('usps_height') * 2), 1)) . '</Girth>';


The other is a conundrum. USPS Priority Int'l says it requires a postcode for shipping to Canada, but their API doesn't allow for a postcode to be entered. If you try to send the postcode the same way you send it for domestic rates, it rejects it, but if you don't send a postcode, the priority international rate shows an error message "postcode required for priority"... The problem is that the usps code expects service id 2 to be valid and blindly assumes that it will have the correct tags, but instead has an error tag. So for now the easiest option is to disable service id 2 when shipping to CA until we can figure it out.

Code: Select all

<ServiceErrors><ServiceError><Id>50050</Id><Description>The Origin ZIP Code and the Destination Postal Code is required for Priority Mail International when mailing to Canada.</Description></ServiceError></ServiceErrors></Service>
1. FIND:

Code: Select all

$allowed = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 21);
2. REPLACE WITH:

Code: Select all

if ($address['iso_code_2'] == 'CA') {
    $allowed = array(1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 21);
} else {
    $allowed = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 21);
}
Redtube Beeg Spankbang
thank you

Newbie

Posts

Joined
Sun Dec 09, 2018 2:00 am

Post by muskeboxerice » Tue Jan 01, 2019 3:58 am

yes i need same soliution thank you very much

Newbie

Posts

Joined
Tue Jan 01, 2019 3:54 am

Who is online

Users browsing this forum: No registered users and 20 guests