HomeHome Product Discus... Product Discus...Store LocatorStore LocatorAdjusting the radius to locate storesAdjusting the radius to locate stores
Previous
 
Next
New Post
7/7/2013 10:40 AM
 
How do you determine the distance from the address to the store before you say there are no stores near you? 
How can this distance be adjusted in the store locator module?

Go to SSMS and open the sproc "SmithStoreLocator_ListRetailersByMap" and adjust the radius parameter as outlined below:

ALTER PROCEDURE [dbo].[SmithStoreLocator_ListRetailersByMap]
      @N FLOAT,
      @E FLOAT,
      @S FLOAT,
      @W FLOAT,
      @PortalID INT
AS
      DECLARE @Radius FLOAT = 0.001;
      SELECT R.*
      FROM [Smith_Retailer] R
      WHERE R.PortalID = @PortalID
      AND R.Latitude >= @S - @Radius
      AND R.Latitude <= @N + @Radius
      AND R.Longitude >= @W - @Radius
      AND R.Longitude <= @E + @Radius

Where @Radius is the extra search distance in degrees.



At your service,
Dave Smith
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
Previous
 
Next
HomeHome Product Discus... Product Discus...Store LocatorStore LocatorAdjusting the radius to locate storesAdjusting the radius to locate stores