Post by zendframeworks » Fri Sep 23, 2016 6:00 am

Hello

Opencart Version 2.0.1.1
Theme: Journal

I am getting this error frequently when i am editing orders in opencart

When I am in Step 5 totals when editing orders

Warning: Shipping method required!

I checked chrome console to see errors it is pointing to following errors

Code: Select all

if (json['shipping_methods']) {
								for (i in json['shipping_methods']) {
									html += '<optgroup label="' + json['shipping_methods'][i]['title'] + '">';
								
									if (!json['shipping_methods'][i]['error']) {
										for (j in json['shipping_methods'][i]['quote']) {
											if (json['shipping_methods'][i]['quote'][j]['code'] == $('select[name=\'shipping_method\'] option:selected').val()) {
												html += '<option value="' + json['shipping_methods'][i]['quote'][j]['code'] + '" selected="selected">' + json['shipping_methods'][i]['quote'][j]['title'] + '</option>';
											} else {
												html += '<option value="' + json['shipping_methods'][i]['quote'][j]['code'] + '">' + json['shipping_methods'][i]['quote'][j]['title'] + '</option>';
											}
										}		
									[b][u][color=#FF0000]} else {
										html += '<option value="" style="color: #F00;" disabled="disabled">' + json['shipping_method'][i]['error'] + '</option>';[/color][/u][/b]
									}
									
									html += '</optgroup>';
Following line gives error

} else {
html += '<option value="" style="color: #F00;" disabled="disabled">' + json['shipping_method']['error'] + '</option>';

Image
Image
Image

Attachments

shipping_method_error.jpg

shipping_method_error.jpg (72.94 KiB) Viewed 4412 times



Posts

Joined
Mon Jun 27, 2016 10:59 pm

Post by zendframeworks » Fri Nov 18, 2016 5:44 am

I noticed this issue was being occured only with my custom geo zones.

US All States - All US states

US tax state - One US state where tax apply

US Shipping Zone 48 Contiguous states

Shipping methods - USPS and UPS are set to All Geo Zones
Free Shipping - Set to US Shipping Zone

Whenever i edit an order placed outside of "US Shipping Zone 48 Contiguous states" we get the above error


Posts

Joined
Mon Jun 27, 2016 10:59 pm

Post by thekrotek » Mon Nov 21, 2016 6:15 pm

Well, apparently you method is not available for anyone outside your custom geo zone. This is absolutely normal.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by zendframeworks » Tue Nov 29, 2016 12:49 am

thekrotek wrote:Well, apparently you method is not available for anyone outside your custom geo zone. This is absolutely normal.

But the issue is, in the shipping method, it is selected as All Zones.

For example, in the above case, Shipping method is USPS priority mail and it is in one of the custom zones i have created. - "US All States".


Posts

Joined
Mon Jun 27, 2016 10:59 pm

Post by thekrotek » Tue Nov 29, 2016 4:44 am

I don't think, that problem is with USPS module, since it's default. I saw similar issues with other shipping methods and usually they're related to order itself. It's really hard to guess, what's wrong. A more deep debugging might be necessary.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by seekevin » Tue Jun 11, 2019 6:45 am

Hello,
I have a similar error said "Warning: Shipping method required!"
My setup/Configurations as follow,
- OpenCart version 3.0.3.1_rc is running
- Valid UPS Access Key, User name and password were properly set in opencart
- UPS, the only shipping method/extension is enable. The rest of methods were disable
- product "A" assigned to Tax Class which has tax rate of 9.25% if shipping address is in Geo zone "California"
- Use different shipping address locations for checkout, within CA or out of CA states, still results in such warning message
Your help is needed and very much appreciated.
Kevin

Newbie

Posts

Joined
Sun Mar 03, 2019 6:37 am

Post by thekrotek » Tue Jun 11, 2019 2:35 pm

seekevin wrote:
Tue Jun 11, 2019 6:45 am
Hello,
I have a similar error said "Warning: Shipping method required!"
My setup/Configurations as follow,
- OpenCart version 3.0.3.1_rc is running
- Valid UPS Access Key, User name and password were properly set in opencart
- UPS, the only shipping method/extension is enable. The rest of methods were disable
- product "A" assigned to Tax Class which has tax rate of 9.25% if shipping address is in Geo zone "California"
- Use different shipping address locations for checkout, within CA or out of CA states, still results in such warning message
Your help is needed and very much appreciated.
Kevin
See my reply above. There's no generic solution for this.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by Gemma295 » Tue Nov 19, 2019 6:24 pm

I found the fix here:

<< invalid topic posted >>
Last edited by straightlight on Sat Feb 22, 2020 9:06 pm, edited 1 time in total.
Reason: Removed invalid topic link.

mybkexperience


Newbie

Posts

Joined
Mon Nov 18, 2019 7:22 pm

Post by houree » Sat Feb 22, 2020 1:47 pm

this is a configuration issue not a bug!

Newbie

Posts

Joined
Fri Feb 21, 2020 5:59 pm

Post by bahytt » Tue Mar 03, 2020 1:24 pm

The error in the codebase is in catalog/controller/checkout/shipping_method. php and it's the last OR clause of the if statement. This method will only work if you want to force a shipping method and avoid "Warning Shipping Method Required" error.

mcdvoice survey


Newbie

Posts

Joined
Tue Mar 03, 2020 1:22 pm

Post by carlaonic » Mon Mar 09, 2020 12:54 pm

I'm having this problem and I'm only using one shipping module. "Flat Rate shipping"

The error in the codebase is in catalog/controller/checkout/shipping_method.php and it's the last OR clause of the if statement.
Code: Select all

Code: Select all

if (!isset($shipping[0]) || !isset($shipping[1]) || !isset($this->session->data['shipping_methods'][$shipping[0]]['quote'][$shipping[1]])) {
If you're only using one shipping method like "Flat Rate" shipping then this vqmod will fix the problem. Forcing the posted shipping method to the desired method $this->request->post['shipping_method'] = "flat.flat";

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<modification>
        <id>Force shipping rate</id>
        <version>1.0</version>
        <vqmver>2.X</vqmver>
        <author>oasisfleeting</author>
        <file name="catalog/controller/checkout/shipping_method.php">
                <operation info="fix shipping method error">
                        <search position="before"><![CDATA[
                        if (!isset($this->request->post['shipping_method'])) {
                        ]]></search>
                        <add><![CDATA[
                        $this->request->post['shipping_method'] = "flat.flat";
                        ]]></add>
                </operation>
        </file>
</modification>
This method will only work if you want to force a shipping method and avoid "Warning Shipping Method Required" error.
prepaidcardstatus

Newbie

Posts

Joined
Sat Mar 07, 2020 7:42 pm
Who is online

Users browsing this forum: No registered users and 3 guests