[SOLVED]
Opencart community
we need a USPS module for 3.0.3.8 update before July 9 2023
USPS Ground Advantage
replaces:
USPS Parcel Select Ground® service
USPS First-Class Package Service®
USPS Retail Ground® service
see https://faq.usps.com/s/article/USPS-Ground-Advantage
Opencart community
we need a USPS module for 3.0.3.8 update before July 9 2023
USPS Ground Advantage
replaces:
USPS Parcel Select Ground® service
USPS First-Class Package Service®
USPS Retail Ground® service
see https://faq.usps.com/s/article/USPS-Ground-Advantage
Last edited by riwalker on Wed Jul 19, 2023 2:14 am, edited 1 time in total.
You would need to check the marketplace. I suspect there isn't a free USPS extension for 4.0.2.1 anymore, just paid ones.
Did you find a solution?riwalker wrote: ↑Wed Jun 28, 2023 6:22 amOpencart community
we need a USPS module for 3.0.3.8 update before July 9 2023
USPS Ground Advantage
replaces:
USPS Parcel Select Ground® service
USPS First-Class Package Service®
USPS Retail Ground® service
see https://faq.usps.com/s/article/USPS-Ground-Advantage
I just updated my USPS Pro extension for Ground Advantage:
OpenCartX: https://www.opencartx.com/usps-pro
Opencart.com: https://www.opencart.com/index.php?rout ... n_id=25424
OpenCartX: https://www.opencartx.com/usps-pro
Opencart.com: https://www.opencart.com/index.php?rout ... n_id=25424
Works perfectly! Thank you.Johnathan wrote: ↑Tue Jul 11, 2023 6:01 amI just updated my USPS Pro extension for Ground Advantage:
OpenCartX: https://www.opencartx.com/usps-pro
Opencart.com: https://www.opencart.com/index.php?rout ... n_id=25424
Now that the issue has been resolved, please add: [SOLVED] at the beginning of the subject line on your first post.websiteworld wrote: ↑Tue Jul 11, 2023 8:58 amWorks perfectly! Thank you.Johnathan wrote: ↑Tue Jul 11, 2023 6:01 amI just updated my USPS Pro extension for Ground Advantage:
OpenCartX: https://www.opencartx.com/usps-pro
Opencart.com: https://www.opencart.com/index.php?rout ... n_id=25424
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Uh, it's not my thread.straightlight wrote: ↑Tue Jul 11, 2023 9:23 amNow that the issue has been resolved, please add: [SOLVED] at the beginning of the subject line on your first post.websiteworld wrote: ↑Tue Jul 11, 2023 8:58 amWorks perfectly! Thank you.Johnathan wrote: ↑Tue Jul 11, 2023 6:01 amI just updated my USPS Pro extension for Ground Advantage:
OpenCartX: https://www.opencartx.com/usps-pro
Opencart.com: https://www.opencart.com/index.php?rout ... n_id=25424
Correct, my apologize.websiteworld wrote: ↑Tue Jul 11, 2023 6:36 pmUh, it's not my thread.straightlight wrote: ↑Tue Jul 11, 2023 9:23 amNow that the issue has been resolved, please add: [SOLVED] at the beginning of the subject line on your first post.

Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
They do use credits in Star Trek, still, while payments on the Marketplace still take credit transactions.websiteworld wrote: ↑Wed Jul 19, 2023 2:35 amThis is not Star Trek, people don't work for free on Earth. Pay the money, just like you pay for food.

Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
If you turn on debug mode and get some shipping rates, look in the error log for what USPS returns and if you know what to look for you can update the following files:
admin/language/en-gb/extension/shipping/usps.php
admin/controller/extension/shipping/usps.php
admin/view/template/extension/shipping/usps.tpl
catalog/model/extension/shipping/usps.php
Use the examples in the files for what to duplicate/change.
And you can add in whichever classid you wish to offer. I suspect most will only need classid 1058.
Mike
cue4cheap not cheap quality
Hi Mike - thanks for the tips! I used your tips to update the relevant files in my test system and can now see USPS Ground Advantage in the extension admin panel. The challenge is that when I select that option, I still don't see it appearing as an option when estimating shipping in the shopping cart. I've gone back through the files a few times to ensure I've added or changed the relevant data. The only thing I can find different is I am running 3.0.3.2 and have /admin/view/template/extension/shipping/usps.twig vs usps.tpl per your note above. Not sure if that's something that's changed in subsequent versions and perhaps the .twig extension will prevent this fix from working? The included USPS extension has been working fine for 11 years, so if I can get this fixed, it should continue to do the job.Cue4cheap wrote: ↑Fri Sep 15, 2023 7:31 amIf you turn on debug mode and get some shipping rates, look in the error log for what USPS returns and if you know what to look for you can update the following files:
admin/language/en-gb/extension/shipping/usps.php
admin/controller/extension/shipping/usps.php
admin/view/template/extension/shipping/usps.tpl
catalog/model/extension/shipping/usps.php
Use the examples in the files for what to duplicate/change.
And you can add in whichever classid you wish to offer. I suspect most will only need classid 1058.
Mike
Thanks for your help...
Jason
Jason, Could you let me know if you do find a fix for this that works? I too have been using the free USPS module forever and am very reluctant to shell out a bunch of money for a commercial extension when really all I need is the ability for my customers to see the new Ground Advantage option at checkout (Priority Mail now seems SO expensive when it's the only option that I'm afraid it's turning away sales). Thanks!
Give me a bit and I'll relook at it. I am currently away and have limited access but that should be the files to update. And yes should be twig for the 3.x version.rotaryracer wrote: ↑Wed Sep 27, 2023 10:05 pmHi Mike - thanks for the tips! I used your tips to update the relevant files in my test system and can now see USPS Ground Advantage in the extension admin panel. The challenge is that when I select that option, I still don't see it appearing as an option when estimating shipping in the shopping cart. I've gone back through the files a few times to ensure I've added or changed the relevant data. The only thing I can find different is I am running 3.0.3.2 and have /admin/view/template/extension/shipping/usps.twig vs usps.tpl per your note above. Not sure if that's something that's changed in subsequent versions and perhaps the .twig extension will prevent this fix from working? The included USPS extension has been working fine for 11 years, so if I can get this fixed, it should continue to do the job.Cue4cheap wrote: ↑Fri Sep 15, 2023 7:31 amIf you turn on debug mode and get some shipping rates, look in the error log for what USPS returns and if you know what to look for you can update the following files:
admin/language/en-gb/extension/shipping/usps.php
admin/controller/extension/shipping/usps.php
admin/view/template/extension/shipping/usps.tpl
catalog/model/extension/shipping/usps.php
Use the examples in the files for what to duplicate/change.
And you can add in whichever classid you wish to offer. I suspect most will only need classid 1058.
Mike
Thanks for your help...
Jason
Mike
Last edited by Cue4cheap on Thu Sep 28, 2023 11:31 am, edited 1 time in total.
cue4cheap not cheap quality
Ok down and dirty since I don't have good access to the code to adjust it 100% properly (i.e. getting rid of outdated code)...
Mike
Code: Select all
admin/controller/extension/shipping/usps.php
add:
if (isset($this->request->post['shipping_usps_domestic_1058'])) {
$data['shipping_usps_domestic_1058'] = $this->request->post['shipping_usps_domestic_1058'];
} else {
$data['shipping_usps_domestic_1058'] = $this->config->get('shipping_usps_domestic_1058');
}
admin/language/en-gb/extension/shipping/usps.php
add:
$_['text_domestic_1058'] = 'USPS Ground Advantage';
admin/view/template/extension/shipping/usps.twig
add:
<div class="checkbox">
<label>
{% if shipping_usps_domestic_1058 %}
<input type="checkbox" name="shipping_usps_domestic_1058" value="1" checked="checked" />
{{ text_domestic_1058 }}
{% else %}
<input type="checkbox" name="shipping_usps_domestic_1058" value="1" />
{{ text_domestic_1058 }}
{% endif %}
</label>
</div>
catalog/model/extension/shipping/usps.php
Add in ",1058" at the end
if ($rate_response || $intl_rate_response) {
if ($address['iso_code_2'] == 'US') {
$allowed = array(0, 1, 2, 3, 4, 5, 6, 7, 12, 13, 16, 17, 18, 19, 22, 23, 25, 27, 28,1058);
cue4cheap not cheap quality
Mike, this is perfect - thank you VERY much! Your original tips were spot on, I was just the idiot increasing the domestic service # sequentially (i.e. shipping_domestic_29 as the last one was 28) instead of using the actual CLASSID of 1058. Once I corrected that, it worked like a champ!Cue4cheap wrote: ↑Thu Sep 28, 2023 11:14 amOk down and dirty since I don't have good access to the code to adjust it 100% properly (i.e. getting rid of outdated code)...
MikeCode: Select all
admin/controller/extension/shipping/usps.php add: if (isset($this->request->post['shipping_usps_domestic_1058'])) { $data['shipping_usps_domestic_1058'] = $this->request->post['shipping_usps_domestic_1058']; } else { $data['shipping_usps_domestic_1058'] = $this->config->get('shipping_usps_domestic_1058'); } admin/language/en-gb/extension/shipping/usps.php add: $_['text_domestic_1058'] = 'USPS Ground Advantage'; admin/view/template/extension/shipping/usps.twig add: <div class="checkbox"> <label> {% if shipping_usps_domestic_1058 %} <input type="checkbox" name="shipping_usps_domestic_1058" value="1" checked="checked" /> {{ text_domestic_1058 }} {% else %} <input type="checkbox" name="shipping_usps_domestic_1058" value="1" /> {{ text_domestic_1058 }} {% endif %} </label> </div> catalog/model/extension/shipping/usps.php Add in ",1058" at the end if ($rate_response || $intl_rate_response) { if ($address['iso_code_2'] == 'US') { $allowed = array(0, 1, 2, 3, 4, 5, 6, 7, 12, 13, 16, 17, 18, 19, 22, 23, 25, 27, 28,1058);
Greatly appreciate the assist....
Best Regards,
Jason
Naturally...spoke too soon. Bizarrely, this works perfect in my test environment which is a close (but not exact) copy of my production environment. When I make the same changes in production, the option for USPS Ground Advantage doesn't show up in the admin screen at all. Not sure if I have another extension or XML suppressing adding options, but I've gone through all domestic and international (just in case) options and it resolutely refuses to show itself.
I'll play around a bit more...may consider nuking Parcel Post (since that's no longer a thing) and replacing with Ground Advantage to see if that changes anything. If not, I might end up having to suck it up and buy a module, which would be frustrating because I know Mike's tips can work. 
Any thoughts on why it may not display in the admin screen? Debug is showing correct responses with "1058" data, and the edits made in production are exactly the same as before.
Thanks...
Jason
UPDATE - Tried replacing all instances of 'Parcel Post' (CLASSID=4) with 'USPS Ground Advantage', including changing the class from 4 to 1058. If I go back into the admin screen, the line for Parcel Post is completely blanked out with no text, although the checkbox is still there. If I select the blank checkbox, it still does not show Ground Advantage in the checkout. There must be something goofy with this module being "protected" from changes (or another XML causing havoc) on the production side, as it works with no issues at all in the testing site.


Any thoughts on why it may not display in the admin screen? Debug is showing correct responses with "1058" data, and the edits made in production are exactly the same as before.
Thanks...
Jason
UPDATE - Tried replacing all instances of 'Parcel Post' (CLASSID=4) with 'USPS Ground Advantage', including changing the class from 4 to 1058. If I go back into the admin screen, the line for Parcel Post is completely blanked out with no text, although the checkbox is still there. If I select the blank checkbox, it still does not show Ground Advantage in the checkout. There must be something goofy with this module being "protected" from changes (or another XML causing havoc) on the production side, as it works with no issues at all in the testing site.
Who is online
Users browsing this forum: Bing [Bot] and 10 guests