Page 1 of 2

[SOLVED] USPS - Need new Service "USPS Ground Advantage" before July 9, 2023.

Posted: Wed Jun 28, 2023 6:22 am
by riwalker
[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

Re: USPS - Need new Service "USPS Ground Advantage" before July 9, 2023.

Posted: Wed Jun 28, 2023 7:57 am
by KandC
I just downloaded Version 4.0.2.1. Where can I download the USPS version that is currently available?

Re: USPS - Need new Service "USPS Ground Advantage" before July 9, 2023.

Posted: Wed Jun 28, 2023 6:02 pm
by ADD Creative
KandC wrote:
Wed Jun 28, 2023 7:57 am
I just downloaded Version 4.0.2.1. Where can I download the USPS version that is currently available?
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.

Re: USPS - Need new Service "USPS Ground Advantage" before July 9, 2023.

Posted: Tue Jul 11, 2023 4:58 am
by websiteworld
riwalker wrote:
Wed Jun 28, 2023 6:22 am
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
Did you find a solution?

Re: USPS - Need new Service "USPS Ground Advantage" before July 9, 2023.

Posted: Tue Jul 11, 2023 6:01 am
by Johnathan
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

Re: USPS - Need new Service "USPS Ground Advantage" before July 9, 2023.

Posted: Tue Jul 11, 2023 8:58 am
by websiteworld
Johnathan wrote:
Tue Jul 11, 2023 6:01 am
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
Works perfectly! Thank you.

Re: USPS - Need new Service "USPS Ground Advantage" before July 9, 2023.

Posted: Tue Jul 11, 2023 9:23 am
by straightlight
websiteworld wrote:
Tue Jul 11, 2023 8:58 am
Johnathan wrote:
Tue Jul 11, 2023 6:01 am
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
Works perfectly! Thank you.
Now that the issue has been resolved, please add: [SOLVED] at the beginning of the subject line on your first post.

Re: USPS - Need new Service "USPS Ground Advantage" before July 9, 2023.

Posted: Tue Jul 11, 2023 6:36 pm
by websiteworld
straightlight wrote:
Tue Jul 11, 2023 9:23 am
websiteworld wrote:
Tue Jul 11, 2023 8:58 am
Johnathan wrote:
Tue Jul 11, 2023 6:01 am
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
Works perfectly! Thank you.
Now that the issue has been resolved, please add: [SOLVED] at the beginning of the subject line on your first post.
Uh, it's not my thread.

Re: USPS - Need new Service "USPS Ground Advantage" before July 9, 2023.

Posted: Tue Jul 11, 2023 11:52 pm
by straightlight
websiteworld wrote:
Tue Jul 11, 2023 6:36 pm
straightlight wrote:
Tue Jul 11, 2023 9:23 am
websiteworld wrote:
Tue Jul 11, 2023 8:58 am


Works perfectly! Thank you.
Now that the issue has been resolved, please add: [SOLVED] at the beginning of the subject line on your first post.
Uh, it's not my thread.
Correct, my apologize. :)

Re: USPS - Need new Service "USPS Ground Advantage" before July 9, 2023.

Posted: Wed Jul 12, 2023 3:13 am
by cpe mt
I'm using 3.0.3.2 and the USPS module that came with this installation. How do I update that particular one? Thanks!

Re: USPS - Need new Service "USPS Ground Advantage" before July 9, 2023.

Posted: Wed Jul 19, 2023 2:14 am
by riwalker
[SOLVED], but shame this is not a free module- there is nothing more basic than the need for a USPS shipping module to make an ecommerce system viable, shame on 'opencart' for not solving this with a free module.

Re: USPS - Need new Service "USPS Ground Advantage" before July 9, 2023.

Posted: Wed Jul 19, 2023 2:35 am
by websiteworld
riwalker wrote:
Wed Jul 19, 2023 2:14 am
[SOLVED], but shame this is not a free module
This is not Star Trek, people don't work for free on Earth. Pay the money, just like you pay for food.

Re: USPS - Need new Service "USPS Ground Advantage" before July 9, 2023.

Posted: Wed Jul 19, 2023 2:59 am
by straightlight
websiteworld wrote:
Wed Jul 19, 2023 2:35 am
riwalker wrote:
Wed Jul 19, 2023 2:14 am
[SOLVED], but shame this is not a free module
This is not Star Trek, people don't work for free on Earth. Pay the money, just like you pay for food.
They do use credits in Star Trek, still, while payments on the Marketplace still take credit transactions. ;)

Re: USPS - Need new Service "USPS Ground Advantage" before July 9, 2023.

Posted: Fri Sep 15, 2023 7:31 am
by Cue4cheap
riwalker wrote:
Wed Jul 19, 2023 2:14 am
[SOLVED], but shame this is not a free module- there is nothing more basic than the need for a USPS shipping module to make an ecommerce system viable, shame on 'opencart' for not solving this with a free module.
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

Re: USPS - Need new Service "USPS Ground Advantage" before July 9, 2023.

Posted: Wed Sep 27, 2023 10:05 pm
by rotaryracer
Cue4cheap wrote:
Fri Sep 15, 2023 7:31 am
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
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.

Thanks for your help...

Jason

Re: [SOLVED] USPS - Need new Service "USPS Ground Advantage" before July 9, 2023.

Posted: Thu Sep 28, 2023 6:37 am
by YarniaPDX
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!

Re: USPS - Need new Service "USPS Ground Advantage" before July 9, 2023.

Posted: Thu Sep 28, 2023 10:45 am
by Cue4cheap
rotaryracer wrote:
Wed Sep 27, 2023 10:05 pm
Cue4cheap wrote:
Fri Sep 15, 2023 7:31 am
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
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.

Thanks for your help...

Jason
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.
Mike

Re: [SOLVED] USPS - Need new Service "USPS Ground Advantage" before July 9, 2023.

Posted: Thu Sep 28, 2023 11:14 am
by Cue4cheap
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)...

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);
Mike

Re: [SOLVED] USPS - Need new Service "USPS Ground Advantage" before July 9, 2023.

Posted: Thu Sep 28, 2023 7:01 pm
by rotaryracer
Cue4cheap wrote:
Thu Sep 28, 2023 11:14 am
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)...

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);
Mike
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!

Greatly appreciate the assist....

Best Regards,

Jason

Re: [SOLVED] USPS - Need new Service "USPS Ground Advantage" before July 9, 2023.

Posted: Thu Sep 28, 2023 8:27 pm
by rotaryracer
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.