We build custom web applications
to grow your business.

How to fix opencart Warning: No Shipping options are available

If you have ever tried to use the weight based shipping option in Opencart, chances are your customer saw this warning at checkout: "opencart Warning: No Shipping options are available".

When you select weight based shipping option is Opencart, the system tries to run a mysql query on the "zone_to_geo_zone" table, with an attempt to match your address information with that found in the zone and country tables. The query looks like this:

   $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "zone_to_geo_zone WHERE geo_zone_id = '" . (int)$result['geo_zone_id'] . "' AND country_id = '" . (int)$address['country_id'] . "' AND (zone_id = '" . (int)$address['zone_id'] . "' OR zone_id = '0')");

Here is the problem. Opencart zone_to_geo_zone table is only populated with UK data, so you will have to add the US data from the zone table to it as well.

Follow these steps:

1) Go to systems > settings > Geo Zones and a US zone.Geo_zone_name: US; description: US. Your geo_zone_id in your geo_zone table will likely be 5 since there are two existing UK zones that come with install.

2) Add US zone_id and country_id to the zone_to_geo_zone table by running this mysql query: insert into zone_to_geo_zone (zone_id, country_id) SELECT zone_id, country_id fron zone WHERE country_id = 223)

3) Update the table with the current US geo_zone_id: update `zone_to_geo_zone` set geo_zone_id = 5 where geo_zone_id = 0

Most of the magic for weight based shipping happens in the catalog/model/extension/shipping/weight.php AND the catalog/controller/checkout/shipping_method.php files.

Hope this would be of use to you. Need help? Hit the contact link and send me a message.