You have no items in your shopping cart.


Product Distance Sort

More Views

Availability: In stock


Quick Overview

The Magento Distance Sort extension allows users to sort products by distance from the user's location.

* Required Fields



Our DistanceSort 2 extension allows customers to sort products by distance from their location. All you really need to do is add address information or even very general locations like Mount Rushmore or Disneyland to the products. With that information, either Google or Bing will automatically provide the latitude and longitude for the product’s location and it will be saved to the product. Then all you need are customers. The customer’s location will automatically be obtained from their IP address and the distance calculation will happen on the fly!

Our newest edition, version 2, includes a Layered Navigation slider which your customers can easily use to refine their search to only show products within the desired distance range.

Your products will also be plotted out on a Google Map at the bottom of the product list for a helpful visual reference.

Additionally, this extension will work with any theme or custom layered navigation module!


  • Sort products by distance from the customer’s location.
  • Layered Navigation distance allows the customer to refine their search range.
  • Works on Category Pages and Search Results pages.
  • Customer’s location is automatically obtained from their IP address.
  • User can enter a different “shopping from” location if desired.
  • Products are plotted out on a Google Map.
  • Choose whether to display distances in Miles or Kilometers.
  • Option to use distance as default sort order.
  • Display distance differently on Grid and List views.
  • This extension does not require you to modify ANY code.

Bullet Points:

  • You do not need to have location information for every product. The extension will work perfectly even if you only have location info for some products.
  • If user visits a category in which no products have location data, distance sort will purposely not be available.
  • Product location can be obtained from either specific addresses or even very general locations.
  • Distance Sort works internationally.
  • This extension uses Free APIs from Google and Bing. NO PAID SUBSCRIPTIONS!

How Does It Work?

DistanceSort 2 uses “geocoding”, that is the retrieval of latitude and longitude coordinates for an address or other geographical data. Special mathematical formulas are used to calculate the distance from the starting point(the customer) to the endpoint(the product). When a customer comes onto your website, their IP address is used to automatically obtain their location. Before the list of products loads, the distance from the user to each product is calculated and the resulting distance is temporarily added to the product.

You can sort the products in either Ascending or Descending order by distance. When sorting by distance, any products that don’t have location data associated with them will be pushed to the end of the list. All of the other sort options (name, position, price, etc) will still work exactly as they always have. This just adds another great option to the list.

More On Geocoding

Geocoding is accomplished when the extension submits your product’s location to Google or Bing who then returns latitude and longitude coordinates. Once these coordinates are obtained, they are saved to the database eliminating the need to retrieve coordinates every time.

Google and Bing free accounts both have limits to the number of geocoding requests that can be submitted in a 24-hour period. Google allows 2,500 requests per day and as of the time of writing this, Bing’s limit could not be determined, but it is in the thousands. The extension primarily relies on Google, but if Google should fail or if you hit the limit, it then turns to Bing. This is how we virtually eliminate having to sign up for a paid subscription to Google and Bing Geocoding services.

The extension allows you to bulk geocode your products so that you do not have to submit them one by one. Once a product location is geocoded, it is saved to the product so that you do not need to geocode that product again. However, if you ever change the product location, it will trigger an event that re- geocodes the product automatically. It happens behind the scenes, you never have to do anything to make this happen.

If all of this “geocoding talk” is confusing, just check out the demo and see how it works. It’s much simpler than it sounds!

Frontend Demo

Write Your Own Review

You're reviewing: Product Distance Sort

How do you rate this product? *

  1 star 2 stars 3 stars 4 stars 5 stars

You may also be interested in the following product(s)