Radial Distance Shipping Restriction

  • Posts: 127
  • Thank you received: 8
8 years 7 months ago #236464

-- HikaShop version -- : 2.6.1
-- Joomla version -- : 3.5.1
-- PHP version -- : 5.6.19
-- Browser(s) name and version -- : IE, Firefox, Chrome

We have a Florist who is using a local courier who will only deliver within a set radius of 25km
Is there any way we can do this within the system?
The current restriction by postcode range does not really work well for us as the placement of the postcodes is not logical and pretty random.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 7 months ago #236490

Hi,

If post codes ranges limitations don't work for that case, the only option left is to have the shipping plugin geolocation the address with a specific API, like google's:
developers.google.com/maps/documentation...o#GeocodingResponses
Then, when the plugin get the latitude and longitude of the address, it does some math to calculate whether the point is in that 25km radius around the shop's latitude/longitude point.
So it will require the development of a shipping plugin.
Basically, a copy of the manual shipping plugin, which just three options added for the longitude/latitude/radius values of the store, and the implementation of the onShippingDisplay function where the gelocation API would be called, the math done, and the shipping methods from $methods array would be filtered if matching or not and if so, added to the $usable_methods array.
www.hikashop.com/support/documentation/6...ml#onShippingDisplay

Please Log in or Create an account to join the conversation.

  • Posts: 127
  • Thank you received: 8
8 years 7 months ago #237274

Ok the customer has gotten back to us that they don't actually use a radial distance they use a suburb list.

So its an odd shape not radial due to the road access to certain suburbs e.g.

Raymond Terrace to Paterson is 27.2Km
Raymond Terrace to Hawks Nest is 53.8Km
Raymond Terrace to Nelson Bay is 44.5Km (will now deliver here)

Is there a way we can list the suburbs and a price range;

$10 delivery fee to;
Raymond Terrace, Millers Forest, Nelsons Plains, Heatherbrae
$15 delivery fee to;
Beresfield, Tarro, Woodberry, Duckenfield, William Town, Ferodale

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 7 months ago #237295

Hi,

In that case, I suppose that you don't ship in different countries (or maybe even different states).
So you could simply deactivate the current states and instead create new state zones and use them in your state address field instead for the selection of the suburb. Then, you can use these state zones in the zone restriction setting of your manual shipping methods so that each shipping method has a different price for a different set of states (suburbs).

Please Log in or Create an account to join the conversation.

Time to create page: 0.061 seconds
Powered by Kunena Forum