I am using opencart 1.4.7, and so far everything is working great, except for the USPS Display Delivery Time is not working. I have it turned on as well as the Display Delivery Weight (which works fine), but I do not see the delivery time. Currently it looks like this
Priority Mail (Weight: 0.50lb)
First-Class Mail Parcel (Weight: 0.50lb)
It's not a BIG deal if the delivery times are there or not, but it would be nice if they were. Anyone else have this problem, and a possible solution?
thanks!
Priority Mail (Weight: 0.50lb)
First-Class Mail Parcel (Weight: 0.50lb)
It's not a BIG deal if the delivery times are there or not, but it would be nice if they were. Anyone else have this problem, and a possible solution?
thanks!
Last edited by i2Paq on Sat Jan 08, 2011 4:18 pm, edited 1 time in total.
Reason: Topic moved
Reason: Topic moved
Oh, forgot to mention that it displays fine with international shipping, just not domestic (US)...
Which file did you edit to manually add in the entry??Johnathan wrote:My impression from reading the API was that domestically it only works for Express mail anyway. I handle it by manually adding in the time estimate (e.g. "Priority Mail (1-3 days)").
The way I do it is like this:
IN:
REPLACE:
WITH:
IN:
Code: Select all
/catalog/model/shipping/usps.php
Code: Select all
$quote_data[$classid] = array(
'id' => 'usps.' . $classid,
'title' => $postage->getElementsByTagName('MailService')->item(0)->nodeValue,
Code: Select all
$shipping_name = $postage->getElementsByTagName('MailService')->item(0)->nodeValue;
$shipping_name = str_replace('<sup>®</sup>', '', html_entity_decode($shipping_name));
if (strpos($shipping_name, '-Class')) $shipping_name = 'First-Class Mail';
if ($shipping_name == 'First-Class Mail') $shipping_name .= ' (1-3 days)';
elseif ($shipping_name == 'Parcel Post') $shipping_name .= ' (2-8 days)';
elseif ($shipping_name == 'Priority Mail') $shipping_name .= ' (1-3 days)';
elseif ($shipping_name == 'Express Mail') $shipping_name .= ' (1 day)';
$quote_data[$classid] = array(
'id' => 'usps.' . $classid,
'title' => $shipping_name,
Thanks for the code.
I had to use the following in order to get Priority Flat Rate Box and Envelope to work:
if (strpos($shipping_name, '-Class')) $shipping_name = 'First-Class Mail';
if ($shipping_name == 'First-Class Mail') $shipping_name .= ' (3-5 days)';
elseif ($shipping_name == 'Priority Mail Small Flat Rate Box') $shipping_name .= ' (1-3 days)';
elseif ($shipping_name == 'Priority Mail Flat Rate Envelope') $shipping_name .= ' (1-3 days)';
I had to use the following in order to get Priority Flat Rate Box and Envelope to work:
if (strpos($shipping_name, '-Class')) $shipping_name = 'First-Class Mail';
if ($shipping_name == 'First-Class Mail') $shipping_name .= ' (3-5 days)';
elseif ($shipping_name == 'Priority Mail Small Flat Rate Box') $shipping_name .= ' (1-3 days)';
elseif ($shipping_name == 'Priority Mail Flat Rate Envelope') $shipping_name .= ' (1-3 days)';
this was an issue back in 1.4.xNoJoke wrote:Does anyone happen to know how to get this to work in version 1.5.4.1?
Thanks
This is no longer an issue in 1.5.1 or later
However, I don't think the domestic rates include delivery dates in the code. That needs to be added in general. Should work for international rates tho.
I remember in my USPS mod back in 1.4.x... for whatever reason USPS domestic rates are in a different format than the international rates. You have to go through some additional hoops to get domestic rates so that is likely why daniel didn't add them to the core version. I'll look into again when I get a chance and see if I can port over what I had from my old usps mod
Two clients using V1.4.9.3 and v1.5.1.1.
Changed the following line to reflect the new wording:
elseif ($shipping_name == 'Priority Mail 2-Day') $shipping_name = 'Priority Mail (1-3 days)';
The lower version was showing "Priority Mail 1-Day" so that was changed accordingly.
Changed the following line to reflect the new wording:
elseif ($shipping_name == 'Priority Mail 2-Day') $shipping_name = 'Priority Mail (1-3 days)';
The lower version was showing "Priority Mail 1-Day" so that was changed accordingly.
Regards,
Howard Baltus
WebAuthoring.com
TheTrickery.com
Who is online
Users browsing this forum: No registered users and 12 guests