Magento extensions & Pay-as-you-go development

10 years of business 2112 reviews 4.9 average rating
User guide

How to use Store Locator for Magento 2

According to Google, a great part of retail sales are influenced by the web, but the majority is made in shops from local retailers to the big chains.

The Store Locator extension for Magento 2 will increase awareness of all your stores by allowing you to highlight them on a customized Google Map which is then placed on any page of your website.

This map uses HTML5 code which helps the customer by providing, on the same web page, their current position, and a route map to their nearest store.

Specific information relative to each store location can be easily customized from the Magento 2 back-office. For example, opening times, postal, and website addresses.

That extension enhances the Multi Stock Inventory module from Magento 2 and is fully integrated with the suite by providing additional features.

STEP 1: Manage your locations

First of all, you need to create your store locations by adding new sources. For this, go to:
StoresInventorySources

Note that your sources can be assigned to one stock associated with one website only.

Add New Source

With Store Locator, you can manage as many sources as you want from the backend of Magento 2.

To configure your sources, click on ADD NEW SOURCE.

So that a source can be created, it must have:

  • a name
  • a code
  • a store view
  • a customer group
  • longitude and latitude coordinates
  • a URL key
  • a country
  • a postcode

Other information is additional, however, we recommend you to fill in a maximum of fields to be able to reuse them in the Google Map display.

General

  • Name
    This is the name that appears on the front-office of your website in Google Maps. It can be a shop sign or help to localize the store.
    USA Washington Store
  • Code (internal use)
    This is a unique identification code used in the back-office of Magento 2 for each store.
    This code is also used by Google Addresses to identify stores if data files are exported to a Google Places account.
  • Is enabled
    The Default Source must be enabled.
    A default source is required for single-source merchants and product migration.
  • Store View
    A source must be linked to at least one store view to be displayed for customers in Google Maps.
  • Customer Groups
    You must then select the customer group(s) that will be able to see the store.

Store Location

  • Latitude & Longitude
    This information is essential to allow the store to be displayed in Google Maps.
  • Find the coordinates with Google Map
    You can find this information with Google Maps directly by dragging the red cursor.

Store Locator settings

  • Is visible on Store Locator page
    YES/NO
  • Default order of display
    When customer doesn't allow geolocation, then the default order of display is used.
  • Image
    Browse/Drag the image for the store.
    This is the image associated with the store such as the shop front, the logo etc...
    The image appears in the information section when a customer selects this particular store.
    The image can be a .jpeg, .gif or .jpg file.
  • Use default description template
    The default description template is defined in:
    StoresConfigurationWyomindStore Locator

  • Description
    You can also define a description for that particular store. The description appears in the information section when a customer selects this particular store.
    HTML and CSS codes are supported.
    See available variables

Variables available for the store descriptions:
  • {{code}}
    The store's code
  • {{name}}
    The store's name
  • {{phone}}
    The store's phone number
  • {{email}}
    The store's email address
  • {{address_1}}, {{address_2}}, {{city}}, {{state}}, {{country}}, {{zipcode}}
    The store's address
  • {{business_hours}}
    The store's opening hours
  • {{days_off}}
    The store's days off
  • {{image}}
    The store's image
  • {{link}}
    Link to the store's page
  • {{google_map}}
    The Google map with the targeted store
    Note that you can't use the Google map variable in the description template of the Store Locator.
  • {{additional_attribute_code}}
    All custom attributes that you have configured:
    See how to configure your own attributes

Store Page settings

  • Enable store page
    YES/NO
  • URL key
    URL of the store page.
    italy-storeYou'll be able to access the store page from: https://www.yourstore.com/italy-store
  • Use default Page template
    The default page template is defined in:
    StoresConfigurationWyomindStore Locator
  • Page Content
    You can also define a page template for that particular store.
    HTML and CSS code are supported.
    See available variables

Variables available for the page content:
  • {{code}}
    The store's code
  • {{name}}
    The store's name
  • {{phone}}
    The store's phone number
  • {{email}}
    The store's email address
  • {{address_1}}, {{address_2}}, {{city}}, {{state}}, {{country}}, {{zipcode}}
    The store's address
  • {{business_hours}}
    The store's opening hours
  • {{days_off}}
    The store's days off
  • {{image}}
    The store's image
  • {{link}}
    Link to the store's page
  • {{google_map}}
    The Google map with the targeted store
    Note that you can't use the Google map variable in the description template of the Store Locator.
  • {{additional_attribute_code}}
    All custom attributes that you have configured:
    See how to configure your own attributes

Business hours

  • Hours
    The opening hours can be shown for each store. You can set lunch hours as well.
  • Days off
    You can list all the days off. Each date must be on a new line formatted as follows:
    YYYY-MM-DDFor example, if the store is closed on the 1st of January 2019, you can write:
    2019-01-01
    Note that you can also add hours off. Each date and hour must be on a new line formatted as follows:
    yyyy-mm-dd HH:ii-HH:ii For example, if the store is closed on the 24th of December 2020 from 4:30PM to 8:00PM, you can write:
    2020-12-24 16:30-20:00

Contact Info

  • Contact name
    Name of the contact of the store.
  • Email
    It is the email to contact the store.
  • Phone
    Telephone number of the store.
  • Fax
    Fax number of the store.

Address Data

All the details specified in Address Data appear in the information section when a customer selects a particular store. You must fill in:

  • Country
    The country allows customers to filter the store search results.
  • State/Province
    The state code is essential if data files are exported to a Google Places account.
  • City
  • Street
  • Street (additional)
  • Postcode

Extend the functionalities of Store Locator thanks to the Advanced Inventory extension. Manage your stocks across all your sources. Automatically assign each order to one inventory and create different stock levels for each store view.

Additional Data

For each store, you can define your own attributes in order to customize the store page as you want.

For this, go to:
StoresInventorySource Attributes

Click on ADD A NEW ATTRIBUTE.

This works the same way as product attributes.

The attribute can be:

  • text: simple input
  • textarea: multi-line input
  • wysiwyg: HTML input
Note that the attribute code will be generated automatically from the attribute label.

Once saved, a notification displays, and the attribute is listed in the grid.

Once created, the attributes will be displayed in the Additional Data tab of each source.

Then, they can be used in the description template for the Store Locator and in the template for the store page.

Import and export a CSV file

Import

To import a CSV file, click on IMPORT A CSV FILE. You can then click on CHOOSE FILE to upload your file in Magento 2.

Your file must be a CSV file. Values must be separated by tabulations and enclosed by quotation marks.

Once you have chosen your file, click on IMPORT FILE.

A message is displayed and notifies that the sources have been imported in:
StoresInventorySources

Export

To export a CSV file, it is quite easy, you need to click on EXPORT A CSV FILE, and you will be able to download a CSV file that includes all information about the sources you've just created or imported.

In order to import a large number of sources more easily, you can first export a CSV file, fill it with Excel software and save it (CSV format) to finally import it as a CSV file.

Configure the display of your sources

In order to edit the display of your sources in the Google map, go to:
StoresSettingsConfigurationWyomindStore Locator

To see your stores on the map, go to: http://www.yourwebsite.com/storelocator

Add your Google API key

There you will be able to add your API key in the Google API key field.

Indeed, Google is now asking an API key to display the Google map. If you don't have an API key yet, check our FAQ to know how to get your own key.

Note that distances and times will be displayed only if the geolocation is enabled.

Edit the location configuration

You can totally configure the location:

  • Store Locator page URL
    It is the URL of the Store Locator page.
  • Store Locator page title
    It is the title of the Store Locator page.
  • Number of nearest locations to display
    Note that 0 means unlimited.
  • Display the distance from the customer location to the store in the store title
    You can add the distance to the store from the customer location.
  • Display the duration from the customer location to the store in the store title
    You can add the time it takes from the customer location to go to the store.
  • Unit systems for the distance
    Choose between Metric or Imperial.

Edit the store description template

You can change the display of your stores and even add some PHP code.

For example, let's say you want to display the phone number in red. You'll just need to add in the Store description template field:

<span style="color:red"> {{phone}} </span>​


See the available variables. 

Edit the store page template

You have the possibility to edit the Store Page template

See the available variables. 

Edit the time format

You have the possibility to change the format of the date.

For example, for 2:30 AM, use:
h:i A

For more details, you can refer to the below table:

STEP 2: Configure the store map

The Store Locator extension allows you to configure the Store Locator map and to add it on any page of your Magento 2 website.

Add the Store Locator map to any CMS page

You can easily add the Store Locator map to any CMS page saved in the Magento 2 back-office in:
ContentElementsPages

Add the following code in the Layout Update XML field in the Design tab of the CMS page concerned:

<referenceContainer name="content">
 <block 
  class="Wyomind\StoreLocator\Block\StoreLocator" 
  name="storelocator" 
  template="Wyomind_StoreLocator::storelocator.phtml"
 />
</referenceContainer>

Click on SAVE PAGE.

Now the Store Locator map must be displayed on the CMS page you have chosen.

Note that the map is fully responsive.

Customize the Store Locator map

The template which allows the Store Locator map to display is easy to modify with basic PHP and HTML skills.

  • The Store Locator template is found, by default, in:
    app/code/Wyomind/Storelocator/view/frontend/storelocator.phtml
  • All the CSS styles and associated images required to display the Store Locator map are in:
    app/code/Wyomind/Storelocator/view/frontend/web
  • To translate the words on the Store Locator map you can either use the on-line Magento translation tool or copy and translate the translation files available in:
    app/code/Wyomind/Storelocator/i18n/en_US.csv

Drive more offline sales showing all the places where you sell on a Store Locator for Magento® 2!

Display all your stores on a Google map

  • Display all your points of sale in a store locator.
  • Help users finding the directions of the nearest store thanks to geolocation. 
  • Completely customize the display of each store with variables and CSS code.

Create specific pages for each store

Create a unique page for each one of your offline stores and customize the content for each page as you want. 

You are not using the Magento® MSI module? Then, check the Point Of Sale extension

Features

  • Geo-location
  • Show directions to all your stores from any location
  • Distance displayed in miles or kilometers
  • Fully responsive interface
  • CSV import and export feature for the stores
  • Easy and quick configuration of your stores
  • Store details and additional information displayed
  • Images can be added to the stores
  • Configuration of the opening and lunch hours for each day of the week
  • Configuration of the holidays for each store
  • Latitude and longitude of a store automatically filled
  • Add your API key in the configuration of the extension
  • Multiple Store and Website supported
  • Create custom attributes for your stores
  • Customize the description of the store in the store locator
  • Create a specific page for each store
  • Define the content of the stores' pages
  • Link to the stores' pages from the Store Locator
Freqently Asked Questions
Pre-sales informations

This extension works with Magento Community Edition and also Magento Enterprise Edition. To know if Store Locator is compatible with your Magento version, please check the Compatibility tab.

You can use Point Of Sale on any version of Magento 2. 

However, if you are using the Magento MSI module available from Magento 2.3, you must use the Store Locator extension. 

There are some limitations with the Google Shopping API that allows to calculate the directions. Only the 24 closest locations can be calculated but all the points of sale will be displayed anyway in your Magento 2 online store.

License and domains

A license is valid for an unlimited period of time on one single Magento installation

  • If you're using more than one Magento installation, you will have to buy a separate license for each instance.
  • if you're running several domains on a same Magento installation, you will need only one license for all of them.
Although your license doesn’t have a limited period of validity, your support period does. By purchasing an extension, you’ll be granted a 6-month support period for free. Passed this period, you will have to pay for a new one (see FAQ: Extend your Support period)

You can pre-register your live domain to your license in advance.

Thanks to this option, you'll be able to get the extension ready to use on your domain before it goes live.

To pre-register your production domain: 

  1. Go to:
    mY accountLicenses & DOwnloads
  2. Click on  next to the extension you want your domain to pre-register on.
  3. Click on the link at the bottom of the page saying:
    Do you want to pre-register your domain in order to be ready to go live?
  4. Finally, enter your domain name and click on pre-register now .
Attention, this doesn't mean your license is activated. You'll still have to activate it on your new domain when the extension is installed. 

One license is valid for an unlimited period of time on one Magento installation only. However, it is possible to extend or transfer your license in 2 cases: 

  • If you would like to add your testing environments to your license. 
    In that case, it is possible to extend your license to an unlimited number of domains for free.
    For example: mywebsite-staging.com or mywebsite-dev.com
  • If you want to transfer your license to another live domain.
    In that case, the support period for your license must still be active.

To be able to use Store Locator on both your production and testing environments, follow the instructions below:

  1. Download Store Locator.
    (see FAQ: Extensions download)
  2. Install Store Locator on your environment.
    (see FAQ: Extensions installation)
  3. Activate the license.
    (see FAQ: Extensions activation from the backoffice or Extensions activation from the CLI)

Also, if you are managing a large amount of domains, please contact us so that we can automatically whitelist these domains.
Extension versioning and download

In order to download Store Locator, log into your Wyomind account:

    1. Go to:
      my accountLicenses & downloads 
    2. Click on the  icon next to Store Locator.

      A new window opens.

    3. Choose the version of Store Locator.
      You will be able to choose the most recent version of Store Locator (for both Magento 1 and Magento 2).
    4. Click on  .

Your download can start.

When purchasing an extension from wyomind.com, you benefit from a lifetime upgrade. You can at any time download the latest version of the extension directly from your account. 

To upgrade Store Locator, follow the steps below:

  1. Go to:
    my accountLicenses & Downloads
  2. Click on  next to Store Locator.
  3. Choose the latest version of Store Locator (for Magento 1 and Magento 2).
  4. Click on download .
  5. Install the new version of Store Locator to update your Magento admin. 

Extensions Installation/Uninstallation

You can install Store Locator manually.

  1. Download Store Locator (zip file) on:
    mY ACCOUNTLicenses & Downloads
     
    Refer to the FAQ: Extensions download
  2. Once Store Locator is downloaded, open the folder and unzip it.
  3. Copy the content of the unzipped folder and paste all files and directories in your Magento 2 root directory.
  4. In your Command Line Interface, execute:
    bin/magento setup:upgrade 

    If you are using a production mode, execute also:

    bin/magento setup:static-content:deploy  
    bin/magento setup:di:compile  

You can install Store Locator using Composer software in two cases:

  • if you purchased Store Locator on Magento Marketplace.
  • if you purchased Store Locator on Wyomind.com AND requested access to our repository:
    repo.wyomind.com
  1. Add to your composer configuration our repository:
    composer config repositories.wyomind composer https://repo.wyomind.com 

  2. Execute Composer command:
    composer require wyomind/storelocator
  3. Then go in your Command Line Interface and execute:
    bin/magento setup:upgrade ​
  4. If you are using a production mode, also execute:
    bin/magento setup:static-content:deploy  ​
    bin/magento setup:di:compile​

To uninstall Store Locator, start with disabling the extension running the following command:

bin/magento module:disable Wyomind_StoreLocator

Then, you have 2 ways to uninstall the extension depending on how the extension has been previously installed: 

  • Manual installation

    Run the storelocator-uninstall.sh file (you can find it in the extension zip folder) from your Magento root directory:

    sh storelocator-uninstall.sh

     

  • Installation via Composer

    Run the below command line:

    composer remove wyomind/storelocator

Once the uninstallation is over, refresh your cache and enable the compiler back again (if you use it). 

You can install Store Locator via Web Setup Wizard if you purchased it from Magento Marketplace only.

To know how to proceed, all steps are described in the link below: 
http://docs.magento.com/m2/ce/user_guide/system/component-manager.html

Next step is to activate your license:
Extension activation

Extensions activation

Once Store Locator is installed, you have to activate the license. For previous versions, you can activate the license from your back-office:

    1. Go to your Magento admin panel. A message pops up at the top of the page.


      If the message doesn't appear then you must check that:

         1. The Adminhtml_Notifications and Wyomind_Core modules are well enabled.
         2. The HTML output of the Adminhtml_Notifications and Wyomind_Core modules are not disabled in:
      storesconfigurationadvanced advanced
         3. The encryption key well exists in app/etc/env.php:
      <?php
       return array(
       'backend' => array(
       'frontName' => 'admin'
       ),
       'crypt' => array(
       'key' => '1e8f3c6772b7a6a6689c3c8cefa4ccf0'
       ),
       /* ... */
       )
      ?>​
    2. Copy your activation key in:
      StoresConfigurationWyomind Your extension

      You can find your activation key in 2 different places:
      In the confirmation email that you received after purchasing Store Locator.
      In your Wyomind account:My account Licenses & downloads
      Select Store Locator and click on  .

      A new page opens where you'll find your activation key (see below).


    3. In your Magento admin go to:
      StoresConfigurationWyomind Your extension

      Paste the activation key in the Activation Key field and choose between the automatic (yes) or the manual (no) activation method:
      By choosing Yes, the connection to Wyomind license server will be automatic.
      By choosing No, you will have to log on to Wyomind license server yourself.

    4. Click on Save config .
    5. A message appears at the top of your admin panel. Click on that link: 
      Activate it now!
    6. Copy and paste the license code in the License code field from your admin or simply click on Activate now! 


    7. Finally, refresh your cache, log out and log in back straight after, to complete the installation.

When the extension includes other modules, repeat the steps described above for each one, using the corresponding activation keys (each module has its own activation key).

Add another domain to your license


To activate the license on another domain (test, staging...):

  1. Once the extension is installed on the new domain, copy your activation key in:
    StoresConfigurationWyomind Your extension
  2. After having saved the configuration, a notification appears. Click on Add this domain to my license.

  3. A transfer request will then be sent to our team within an hour.
    Once the request is taken care of, you will receive a confirmation email.
    If your transfer request is accepted, you can use Store Locator on both environments at the same time.

Note that the order in which you activate your license on your domains does not matter. You can start with your staging/dev/local environment or with your live domain, the process will be the same.

Also, if you have loads of staging domains, or if you are an agency managing load of domains for your customers, please contact us so that we can automatically whitelist these domains.

Once Store Locator is installed, you have to activate the license.

For this, you can use the below command line (change the Activation key with the corresponding value):

bin/magento wyomind:license:activate Wyomind_StoreLocator <YOUR_ACTIVATION_KEY>

To retrieve the list of all the available modules as well as the licenses status, please use:

bin/magento wyomind:license:status

 

 Among the different status, you can find: 

  • registered = your license is registered
  • pending = you need to run the activation command line
  • invalidated = the license has been invalidated due to a wrong activation key or a license infringement

 

To activate several licenses at the same time, use:

bin/magento wyomind:license:activate \
Wyomind_Extension1,Wyomind_Extension2 \
ACTIVATION_KEY_1,ACTIVATION_KEY_2

or:

bin/magento wyomind:license:activate \
Extension1,Extension2 \
ACTIVATION_KEY_1,ACTIVATION_KEY_2
Extensions use

In order to use Store Locator, you need to have a Google API key filled in the extension's settings. 

Google APIs are now paying services. Find the pricing for Maps, Routes and Places here.

To create an API key:

  1. Log into https://console.developers.google.com
    There, you'll be asked to agree the Terms of Service.
    You can then click on Agree and Continue 

  2. You will first need to create a new project with a name, an organization and a location.
  3. To that project you will have to link some API's by clicking on Enable APIs and services .
  4. From the library you will be able to add the services you want.
  5. In order to use Store Locator, you will need to enable the below APIs by clicking on Enable 

    - Maps JavaScript API

    - Geocoding API

    - Distance Matrix API

    - Directions API

  6. When enabled, you'll be able to see the traffic, errors and latency for each API. 
  7. You should see all the enabled APIs from the APIs section. 
  8. FromAPIs & ServicesCredentials, you will be able to create credentials. 
    Click on Create credentials  and then choose API key.
  9. You'll also have the possibility to restrict your API key by websites, applications, IP addresses...
  10. Once restricted or not, the API key will be listed among the credentials. 
  11. The final step for this to work is to link your account to a billing account from the Billing section. 
Find more info on how to get an API key
Magento® Compatibility

Magento® Open Source

(Magento® Community Edition)

  • 2.4.3
  • 2.4.2
  • 2.4.1
  • 2.4
  • 2.3.7
  • 2.3.6
  • 2.3.5
  • 2.3.4
  • 2.3.3
  • 2.3.2
  • 2.3.1
  • 2.3

Adobe® Commerce

(Magento® Enterprise Edition)

  • 2.4.3
  • 2.4.2
  • 2.4.1
  • 2.4
  • 2.3.7
  • 2.3.6
  • 2.3.5
  • 2.3.4
  • 2.3.3
  • 2.3.2
  • 2.3.1
  • 2.3
User's reviews
Log into your account to leave your review and get up to 3 months of free support.

27th April 2021

Store locator better than advertised! Great tool for our ecom site and amazing support

we bought the store locator tool for our client. The took worked amazing and the support team got back to us quickly with installing and questions about setup. strongly recommend. What we loved most is the featuers and how well it works on mobile. Given that mobile is the future, we look forward to using more extensions from here for future projects. I strongly recommend them!

24th February 2021

Great Extension and Support

We've looked around for a Magento Cloud extension that actually works and we found it here at Wyomind. The support is also fantastic as well. I'm already looking through their list of extensions to find if there is anything else we can use on our site.

Brian - Marketing Agency - User for more than 1 year

26th October 2020

Great Extension - Great Service

Great extension, but even better support. The team at wyomind has gone out of their way with helping us get this extension work exactly like we would like it to and they are very easy to work with. Keep up the great work!

Changelog
  • Application of the store view/customer group filters on the recovery of sources by MSI Stock Status
  • Fix for redirecting to the store pages if there is no corresponding source
  • Fix for a check on a variable

Enhancement

  • Redirection to the store locator page for the source pages in the frontend when the source does not have a store view selected in its configuration
  • Compatibility fix for Magento 2.4.3

Compatibility

  • Fix for a bug preventing the store locator page to display when days off are not correctly filled in for the sources
  • Fix when retrieving sources attributes values for the stores pages display
  • Fix when exporting the sources' opening hours
  • Fix when importing/exporting sources for attributes including line breaks
  • Fix when exporting sources in CSV file
  • Fix for a call to ObjectManager that was not declared

Compatibility

Bug Fix

  • Fix when deleting sources

Compatibility

  • Compatibility with Magento 2.3.5: new modifier/pool in the constructor of the sourceProvider
  • Fix for a notice in the checkout

Bug Fix

  • Fix for a propriety declaration between child and parent class
  • URL fix for the demo scenario

Enhancement

  • Improved license management system (Clear code)
  • Sample data added for the demo
  • Translation file i18n added

Compatibility

  • Fix for the display of stores in the frontend
  • Fix for the display of the stores' pages
  • Possibility to define an order of display for the sources in the store locator if geolocation is not enabled
  • Fix in the inventory_source_storelocator table

Compatibility

  • Compatible with Magento 2.3.3
  • Update of the sources' resourcemodel
Demo store
Front-end
Back-end
Login
StoreLocator
Password
StoreLocator123

Stay tuned and get a coupon code of 10% off any purchase while creating your account!

Subscribe now for updates, promotions and products launch twice a month at most.

Please indicate a valid email