Store Locator for Magento 2: Exporting and Importing Stores

This article provides comprehensive instructions on how to export and import store data using the Store Locator feature in Magento 2. This feature allows you to manage your store locations efficiently, ensuring that your customers can easily find the physical locations of your business.

Exporting Stores

  1. Navigate to Manage Stores:

    • In the Magento admin panel, go to Storelocator > Manage Stores.
    • This section lists all the stores you have added to your Magento store locator.

      (Explore more information about the Purpletree Store Locator for Magento 2.)
  2. Export All Stores:

    • To export all stores, simply click on the Export button at the top of the Manage Stores page.
    • A CSV file containing all the stored data will be generated and downloaded automatically.
    • Save the CSV file to your local machine for future use or backup purposes.
  3. Export Selected Stores:

    • To export only specific stores, select the checkboxes next to the stores you wish to export.
    • Click on the Export button. Only the selected stores will be included in the CSV file.
    • Save the CSV file to your local machine.

1 import store

Importing Stores

Importing store data allows you to add new stores or update existing store information efficiently. This is particularly useful when setting up a new Magento installation or updating multiple store records at once.

  1. Navigate to Import Stores:

    • In the Magento admin panel, go to Storelocator > Import Stores.
    • This section allows you to upload a CSV file to import store data.
  2. Prepare the CSV File:

    • You can either download a sample CSV file by clicking on Download Sample File or use a CSV file that you previously exported.
    • Ensure that the CSV file is correctly formatted and includes all necessary fields.
  3. CSV File Fields:

    • Store ID:
      • Leave this field blank if you are adding a new store.
      • Enter the existing store ID if you are editing a previously added store.
    • Store Name:
      • Enter the name of the store. This will be displayed on the store locator.
    • Country:
      • Enter the country where the store is located.
    • City:
      • Enter the city where the store is located.
    • State:
      • Enter the state or province where the store is located.
    • Postal Code:
      • Enter the postal code (zip code) of the store.
    • Address:
      • Enter the full street address of the store.
    • Latitude:
      • Enter the latitude coordinates. These can be obtained from Google Maps.
    • Longitude:
      • Enter the longitude coordinates. These can also be obtained from Google Maps.
    • Phone:
      • Enter the 10-digit phone number of the store.
    • Store Description:
      • Provide a detailed description of the store. You can use HTML tags to format this description.
    • Status:
      • Enter 0 to disable the store or 1 to enable the store.
    • Show View Page:
      • Enter 1 to display a detailed page on the front, or 0 to hide it.
  4. Import the CSV File:

    • Click on the Browse button and select the prepared CSV file from your local machine.
    • Click on the Import button to upload and process the file.
    • The system will read the CSV file and add or update stores based on the information provided.

      2 import store

Important Notes

  • Do Not Alter Column Names: Do not delete or rename any column names in the CSV file. The import process relies on these column names to correctly map the data.
  • Accurate Data Entry: Ensure that all required fields are filled in accurately to avoid errors during the import process. Incorrect or missing data can lead to import failures or incorrect store information.
  • Use Google Maps for Coordinates: For latitude and longitude, use Google Maps to obtain precise coordinates. This ensures that the store locations are accurately displayed on the map.

By following these detailed steps, you can effectively manage your store data in Magento 2 using the Store Locator feature. This functionality enhances your store's usability, making it easier for customers to locate and visit your physical locations.