Post by riwalker » Wed Jun 28, 2023 6:22 am

[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
Last edited by riwalker on Wed Jul 19, 2023 2:14 am, edited 1 time in total.

Newbie

Posts

Joined
Thu Nov 23, 2017 9:46 pm

Post by KandC » 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?

Active Member

Posts

Joined
Sun Jun 11, 2023 7:14 am

Post by ADD Creative » Wed Jun 28, 2023 6:02 pm

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.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by websiteworld » Tue Jul 11, 2023 4:58 am

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?

User avatar
New member

Posts

Joined
Thu Oct 18, 2012 3:11 am

Post by Johnathan » 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

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by websiteworld » 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.

User avatar
New member

Posts

Joined
Thu Oct 18, 2012 3:11 am

Post by straightlight » 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.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by websiteworld » 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
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.

User avatar
New member

Posts

Joined
Thu Oct 18, 2012 3:11 am

Post by straightlight » Tue Jul 11, 2023 11:52 pm

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. :)

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by cpe mt » Wed Jul 12, 2023 3:13 am

I'm using 3.0.3.2 and the USPS module that came with this installation. How do I update that particular one? Thanks!

New member

Posts

Joined
Mon Oct 02, 2017 10:21 am

Post by riwalker » 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.

Newbie

Posts

Joined
Thu Nov 23, 2017 9:46 pm

Post by websiteworld » 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.

User avatar
New member

Posts

Joined
Thu Oct 18, 2012 3:11 am

Post by straightlight » Wed Jul 19, 2023 2:59 am

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

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Cue4cheap » Fri Sep 15, 2023 7:31 am

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

cue4cheap not cheap quality


Expert Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by rotaryracer » 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

New member

Posts

Joined
Tue Oct 16, 2012 7:45 pm

Post by YarniaPDX » Thu Sep 28, 2023 6:37 am

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!

Active Member

Posts

Joined
Sat Sep 04, 2010 7:10 am

Post by Cue4cheap » Thu Sep 28, 2023 10:45 am

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
Last edited by Cue4cheap on Thu Sep 28, 2023 11:31 am, edited 1 time in total.

cue4cheap not cheap quality


Expert Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by Cue4cheap » 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

cue4cheap not cheap quality


Expert Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by rotaryracer » Thu Sep 28, 2023 7:01 pm

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

New member

Posts

Joined
Tue Oct 16, 2012 7:45 pm

Post by rotaryracer » Thu Sep 28, 2023 8:27 pm

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.

New member

Posts

Joined
Tue Oct 16, 2012 7:45 pm
Who is online

Users browsing this forum: Bing [Bot] and 10 guests