I mean ALL USPS modules released prior to January 21, 2012, whether as addons here or as part of core code in older Zen Cart versions.
Printable View
OK, updated our usps.com php file in the shipping modules, but our sorting code isn't working. File attached and modded code starts on line 297. I've checked the shipping options names and everything seems to be correct but it is still showing all the shipping options as true on the site and not turning the ones off we want by weight. Please take a look and let me know how to adjust. Thanks guys.
You have defined $show_it but you are not using it ...
Add an IF around the method:
See if that helps ...Code:if ($show_it) {
// add $this->usps_countries to title to test actual country
$methods[] = array('id' => $type,
'title' => $title,
'cost' => ($cost * $shipping_num_boxes) + (MODULE_SHIPPING_USPS_HANDLING_METHOD == 'Box' ? $usps_handling_fee * $shipping_num_boxes : $usps_handling_fee) );
// bof: sort by contributed by Marco B
// Sort the options
if (MODULE_SHIPPING_USPS_QUOTE_SORT != 'Unsorted') {
usort($methods,'usps_sort_'.MODULE_SHIPPING_USPS_QUOTE_SORT);
}
// eof: sort by contributed by Marco B
}
}
Perfect thanks!
That is the correct one to use ...
You should see for the Domestic choices:
Quote:
United States Postal Service (1 x 0.06lbs) (First-Class Mail (2 - 5 days)) $1.95
United States Postal Service (1 x 0.06lbs) (Priority Mail (2 - 3 days)) $5.20
United States Postal Service (1 x 0.06lbs) (Parcel Post (4 - 7 days)) $5.20
United States Postal Service (1 x 0.06lbs) (Media Mail) $2.47
United States Postal Service (1 x 0.06lbs) (Library) $2.35
Thank you for creating this new module! I almost have it working.
I installed it per the instructions:
Printed out all my old settings
Uninstalled the USPS module in Admin
Copied the downloaded includes folder to the parent directory (it overwrote the USPS files as expected)
Installed the USPS module in Admin using my old settings
I am having a couple of problems.
1. The estimate shipping table is not working for domestic or international.
2. When checking out as an international customer, it says something like "Sorry we are not able to ship to that region"
I am using 1.3.9h
Thank you,
Gary
Do you have a Zone set on the USPS shipping module?
What settings do you see in the right hand panel if you go to Modules ... Shipping ... and click on USPS ...
Thank you for your reply. Here are my settings.
Enable USPS Shipping
True
Enter the USPS Web Tools User ID
##########
Which server to use
production
Quote Sort Order
Price
Handling Fee - US
0
Handling Fee - International
0
Handling Per Order or Per Box
Box
Decimal Settings
2
Tax Class
Taxable Goods
Tax Basis
Shipping
Shipping Zone
Washington
Sort Order
10
All Packages are Machinable
False
USPS Options
Display weight, Display transit time
Domestic Shipping Methods
EXPRESS, PRIORITY, FIRST CLASS
International Shipping Methods
Global Express, Priority Mail Int Flat Rate Small Box, First Class Mail Int Parcel
Debug Mode
Off