Jump to content

Shipping By Weight - no suitable delivery methods (9 zones)


jasehead

Recommended Posts

Trying to trace why Cubecart is throwing this error (for a customer trying to purchase from Romania):

"Unfortunately there are no suitable delivery methods available for your order. This may be because the total weight of your order is too high or we cannot deliver to your country. Please contact a member of our staff for any further inquiries."

Currently using only the By Weight shipping plugin, expanded from 4 to 9 zones following Al's advice here: https://www.cubecart.com/extensions/shipping-methods/by-weight

I've gone through gateway plugins - two are set to allow specific countries only, the third is PayPal Standard which has no countries allowed/disallowed so it should work worldwide.

I've also gone through the By Weight plugin to make sure that the 22 disallowed countries do not include Romania and are not included in any of the ISO codes for the different zones.  Doesn't appear to be any issues there.  Have also checked for errors in the weight-price array but it seems fine.

The only idea I have at this stage is that, even if 9 zones are enabled as per Al's advice, that somewhere the additional zones are being ignored. I have Romania in Zone 8.

Link to comment
Share on other sites

The documentation does not make it clear as to the format of the weight-cost band syntax.

Using this as an example: 0.25:29,0.5:38,1:49,10:58,30:89

Split into the bands by the comma:

0.25:29 up to and including 0.25 units of weight, the cost is 29 units of money
0.5:38 above 0.25 units of weight, up to and including 0.5 units of weight, the cost is 38 units of money
1:49 above 0.5 units of weight, up to and including 1.00 units of weight, the cost is 49 units of money
10:58 above 1.00 units of weight, up to and including 10.00 units of weight, the cost is 58 units of money
30:89 above 10.00 units of weight, up to and including 30.00 units of weight, the cost is 89 units of money

The upper limit of the weight and the cost is separated by a colon. Do not include currency symbols. The bands are separated by commas.

Link to comment
Share on other sites

It's possible you are running into the bug I've recently reopened on GitHub, however that would ONLY be the case if the billing and delivery address were different AND the billing address would fall outside of your configured zones.

Did all the items in the basket have a weight defined?

What was the total weight of your customers order?

What is your module configuration?

 

 

Link to comment
Share on other sites

In Countries/Zones, Romania has it's box checked OK.

Nothing wrong with the weight:price array for Zone 8 - I exploded it to see if I'd missed a comma or colon but everything is fine and no error there.

All items have a defined weight.  I can't tell what the customer was ordering from within CubeCart, but if they ordered the same as last year it would likely be 0.569kg.

The customer's last order was in a CCv3.0.17 store which has since been upgraded to 6.0.12 - in the admin/customer page I can see there is only a single address in the address book and not separate addresses for Default Delivery and Default Billing.  So I'm wondering if I set those up that it might fix the issue?

Clicking through their old order, I see Romania in their address book but in the Billing and Delivery tabs the country defaults to Afghanistan - because it's the first in the list I guess. Does that always happen for old orders from earlier CubeCart versions?

In any case, if I go through Admin to login as the customer, I still see Romania as the address during checkout.  I tried editing the address which creates a single billing/delivery address but checkout still came back with the "no suitable delivery methods" error.

I then tried to use the address book (in admin) to add a default billing address but it WOULD NOT WORK - could not successfully create another address in the address book for this customer.  I could edit the existing address, but couldn't add a second address as a delivery address (which is what other customers have - a Default Billing Address and a Default Delivery Address even though these are often the same.

So then I tried it through the customer's address book and I COULD add two new addresses (default billing and default delivery, same as other customers) and delete the old address.  Still the same error in checkout.

I could try creating a new customer, but I'm starting to think I've explored the old-address-is-screwy scenario enough to discount it.

===

So I tried adding RO to Zone 1 - AND IT WORKED, no error.

Zone 2 - worked

Zone 3 - worked

Zone 4 - worked

Zone 5 and onward - NO SUITABLE DELIVERY ERROR

That's pretty damning - adding extra zones to the By Weight shipping module looks OK but it's not working.

Edited by jasehead
Further testing showed that the extra zones were not working
Link to comment
Share on other sites

" I see Romania in their address book but in the Billing and Delivery tabs the country defaults to Afghanistan "

That is very suspect and I have a hunch is part of the root cause of the issue. It's very similar to two other issues I've handled this week.

Login as the customer, go to the address book, update the addresses and save them, then validate if the issue still exists. Make sure you empty the basket and re-add the items when testing.

 

Link to comment
Share on other sites

Right, fixed.

If you have changed line 33 in modules/shipping/By_Weight/skin/admin.tpl (to change the 4 to a 9 for example)

{for $i = 1; $i <= 4; $i++}

Then you also have to change line 73 in modules/shipping/By_Weight/shipping.class.php (so you would change the 5 to a 10 - or one more than the number of zones)

for($i=1;$i<5;$i++){ 

 

Now I have LOTS of countries able to purchase again (including Romania) - wonder how many sales I lost in the meantime...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...