30
UNIRGY USER GUIDE uStoreLocator Magento 2

USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd php bin/magento module:enable

  • Upload
    others

  • View
    27

  • Download
    0

Embed Size (px)

Citation preview

Page 1: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

UNIRGY

USER GUIDE

uStoreLocatorMagento 2

Page 2: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 3

UStoRELocAtoR | MAGENto 2

UNIRGY

table of contentsuStoreLocator® overview � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 4

Features � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 4

Installing uStoreLocator® � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �5

Via ioncube® installer � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �5

Via Unirgy® installer � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �5

Installing via SimpleUp user interface � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 7

Manual install � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 8

Main uStoreLocator® configuration � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 9

Location configuration � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 12

custom Fields � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 13

Using the Frontend Interface � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 15

Default Route to Map � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 15

Initial Page � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 15

Map Page Elements � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 16

Using the map � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 17

Searching � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 18

Directions � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 19

customization � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 22

Use in a cMS page/block � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 24

UI Source Files � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 25

Importing Locations � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 26

cSV Import � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 26

Manual Import � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 26

IMPoRtANt � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 27

Exporting � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 27

Uninstalling uStoreLocator® � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 28

contact Us � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 30

Page 3: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 4

UStoRELocAtoR | MAGENto 2

UNIRGY

uStoreLocator® OverviewHelp customers locate your stores, dealers, distributors, products, or services. StoreLocator is a user friendly, simple yet

flexible geo location and directions module with worldwide location support.

Features• Well-organized, easy to use, professionally designed, and customizable interface.

• Universal Search. Enables flexible and intuitive searching by a variety of parameters such as landmark, street name,

postal/zip code, city, state, and country.

• Custom Map Location Icons—Use Google’s default location markers or create custom map marker icons for individual

locations or location types

• Allows for full control of layout and styling with CSS to seamlessly blend with your site’s distinct look and feel.

• Search Results Filtering—Allows the administrator to define various location types or other location specific categories

to allow visitors to filter through results via location tags.

• Provides directions to any defined location

• Easily import or export locations with cSV

• Fully configurable SEO-friendly map page URL

• Ability to assign locations to all or specific stores

• Ability to designate “Featured” locations to be highlighted and moved to the top of the list

• Order by locations by either name or distance

• Assign location-specific default zoom level

• Features fully functional Google Map

• Fast Results. Integrated with and powered by the latest version of Google MAP API v3

• Support for worldwide locations (some Google Map limitations might apply)

• Full support for all major and most popular browsers and Magento versions

• Supports Map, terrain or Satellite views

• Customization ready—contact us for your specific needs

• 1 Year of Free Unlimited Support

Page 4: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 5

UStoRELocAtoR | MAGENto 2

UNIRGY

Installing uStoreLocator®

Via ioncube® installerDownload and install ioncube loader, if not installed yet:

• If you are using PHP 7.0: http://forum.ioncube.com/viewtopic.php?t=4380

• otherwise, choose a proper loader or use the loader wizard from the following link:

http://www.ioncube.com/loaders.php

Via Unirgy® installer1. Download installer modules for proper PHP version:

• PHP 5.5.x:

http://download.unirgy.com/Unirgy_SimpleUp-latest.zip?m=2&php=5.5

http://download.unirgy.com/Unirgy_SimpleLicense-latest.zip?m=2&php=5.5

• PHP 5.6.x, 7.0.x:

http://download.unirgy.com/Unirgy_SimpleUp-latest.zip?m=2&php=5.6

http://download.unirgy.com/Unirgy_SimpleLicense-latest.zip?m=2&php=5.6

2. Extract the contents of the archive. there should be one app folder per archive.

1. connect to your site via FtP or SFtP

2. Navigate to Magento root

3. Upload both app folders into Magento root. Make sure to merge with existing app on the site, not to replace it

Page 5: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 6

UStoRELocAtoR | MAGENto 2

UNIRGY

4. open terminal or SSH session to the server.

5. Execute:

cd <magento root>

php bin/magento module:enable Unirgy_SimpleUp Unirgy_SimpleLicense

php bin/magento setup:upgrade

Follow any instructions for other commands after completing the above In production mode, run

setup:di:compile and setup:static-content:deploy

6. Now Unirgy Installer module should be visiable in System > Tools menu

Page 6: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 7

UStoRELocAtoR | MAGENto 2

UNIRGY

Installing via SimpleUp user interface1. Make sure to have command line access to your web server, either local terminal or remote SSH session.

2. For successful web installation, it is required that:

• to have PHP Zip extension enabled

• verify it in the output of phpinfo() command

• your server can write to app/code folder within Magento root folder, if there is no code folder within app, then

ensure write access to app, Installer will create the sub paths. Since by default Magento prevents web server from

writing to these locations, here are the steps to allow it before attempting install:

cd <magento root>

chmod -R a+w app

the above will give write access to any user in the system. this is not most secure setting, therefore after install procedure is

complete perform the following command to revoke write access:

cd <magento root>

chmod -R og-w app

3. Login in Magento admin.

4. Navigate to System > Tools > Unirgy Installer

5. click on Add Licenses tab.

Page 7: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 8

UStoRELocAtoR | MAGENto 2

UNIRGY

Manual InstallIf for some reason cannot use the Unirgy® Installer, you can install the module manually by following these instructions:

• Go to the cache page of your Magento installation.

• Download the archive from the download link that is in the e-mail you received upon request.

• Unzip the files.

• Place them in the root directory in your Magento installation. If you had older versions of the module you may be

prompted to replace existing files. Please do so.

• Disable compilation mode if it is running

• If you are using a bytecode cache such as APc or eAccelerator, you may need to disable it or flush it after installing the

module.

• You will find a few directories that match some of the directories in the Magento root.

• Make sure that you have Ioncube loader installed on your server.

• In the Magento cache page, hit the button labeled “Flush Cache Storage.” Do not open any other pages before

clearing the cache.

• If you are logged into the Magento Admin, log out and log back in.

• You should now see a new menu item, Store Locations, under the CMS menu and Store Locations in System >

Configuration > General

• If you wish to use compilation mode, go to Tools > Compilation and run the tool

Page 8: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 9

UStoRELocAtoR | MAGENto 2

UNIRGY

Main uStoreLocator® Configuration You can find the main uStoreLocator® configuration in System > Configuration under the General section.

Page 9: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 10

UStoRELocAtoR | MAGENto 2

UNIRGY

Below is a brief description of the available options.

Custom Map URL

Here you can change default map location from uStoreLocator/location/map to a custom URL. For example, “locations.html”

Simple API key

It is now required to use an API key provided by Google. It allows you to track visits and other statistics from your Google

console.

Page Title

A string that will be used as page title:

Search radius options

Here you can provide a list of numbers separated by comma that will be presented to the user as a dropdown list of search

radius’s to choose from.

Show Map on Page Load

If set to “No” , map will not display

Scale location icons

If set to “Yes” custom icons used will be scaled proportionally to default Google icons size.

Use geo location address

Enable the geo location address to display to the user.

Default Location Address

there is a dropdown list containing all available locations to choose from. Location selected here will be scrolled to after map

is loaded.

Minimal Map Zoom

this is the minimum zoom allowed for the map after the map location is moved or its projection is resized—useful when

user clicks on location not to be brought too close to the ground. this way the location can have a better context within the

surrounding area.

Results Sorted By

this determines how search results are sorted. It can either be by name (alphabetically) or by distance from search location.

Default Sort Direction

this determines ascending or descending order of sort setting from above.

Default Search Radius

If set and matching one of values in the Search radius options, that value will be preselected in the radius drop down on the

frontend.

Page 10: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 11

UStoRELocAtoR | MAGENto 2

UNIRGY

Distance Units (mi or km)

Show distances in miles or kilometers.

Default Country

If selected, only stores from that country will appear on the map initially. this does not affect search results.

No Result Coordinates

When there are no coordinates passed to Google, the map defaults to the middle of the ocean. You can override this location

coordinates here:

Number of Results to Show

Maximum number of results to show:

Import locations

Here you can upload a cSV file with location data for quick imports.

Overwrite existing locations on import?

If set to ‘No’, import will add imported records to existing records. otherwise all existing records will be deleted and only

imported will remain.

Export Locations

Quickly export all locations in cSV data format. these files are best viewed with openoffice calc.

Layout

Layout template to use on map page, works the same way as it works in cMS pages.

Page 11: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 12

UStoRELocAtoR | MAGENto 2

UNIRGY

Location ConfigurationYou can find the main uStoreLocator® locations list by selecting “Store Locations” under the cMS menu in admin section.

Below is brief explanation of the available options:

1. Title—title of location

2. Address to be displayed—An address will be displayed in the frontend. It is not used for mapping the location so it

can be any text. Line breaks are preserved.

3. Phone—Location phone number. It is not validated against any phone format, so it can practically be any text

4. Website URL / Email—the location URL or e-mail address is considered to be an absolute URL if it begins with http://,

and it is considered to be a mailto link if it contains an @ symbol. otherwise it is a relative URI to the current site.

5. Store View—You can choose one or more stores to which this location belongs. If you select any, location will be only

shown when these stores are active. If you do not select any option, the location will be shown in all stores.

6. Select location country—If you select a country here and the main setting “Default country” is enabled, the location

will be shown only if its country matches the store setting.

7. Store type—this is a list of tags that represent the store type—like food, apparel, and electronics. these tags are then

used on the frontend to allow quick filtering of current results by them

8. This is featured location—If this is set to ‘Yes’, location will be listed on top of the list regardless of its name or

distance from current search. It will also receive a class ‘featured’ to allow for custom styling.

9. Notes—Arbitrary text that will be displayed in the map info window for this location

10. Dropship Vendor—if you have the uDropship module installed, this will allow you to pick a vendor to associate with

this location. *Note: this option will only display if you have added the uDropship extension.

11. Custom icon image—custom icon to personalize or distinguish this location. the only accepted format is PNG and

there is maximum size restriction of 100×100 pixels. If “Scale location icons” in the main settings is set to “Yes”, the icon

will be resized on the map canvas, but not resized in the locations list.

12. Add sequence label to marker?—if you are not using custom icons, you can decide whether to use sequential

numbers for default Google pins.

13. Address for geolocation—this is the address that is used for the geolocation and positioning of the location. It should

represent a location that Google can find.

14. Latitude—if you prefer, you can explicitly enter the latitude and longitude for the location, which is useful if location

is away from any administrative addresses or you want to be explicit with these numbers. If you are copying the

Page 12: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 13

UStoRELocAtoR | MAGENto 2

UNIRGY

coordinates from Google, note that Google does not show negative numbers for West, but instead lists a letter “S”

after the coordinate number. You will need to include the minus sign before Southern coordinates in order for the

uStoreLocator® to parse the location properly.

15. Longitude—Longitude number. If you are copying the coordinates from Google, note that Google does not always

include negative numbers for West, but instead lists a letter “W” after the coordinate number. You will need to include

the minus sign before the number in order for the uStoreLocator® to parse it properly.

16. Initial location zoom—When clicking on sidebar entry for this location, this is the zoom level that will be displayed to

the user.

custom Fieldscustom fields contain arbitrary data to be displayed on the info window. these are optional and can be left empty.

Page 13: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 14

UStoRELocAtoR | MAGENto 2

UNIRGY

configure Location

Page 14: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 15

UStoRELocAtoR | MAGENto 2

UNIRGY

Using the Frontend Interface

Default Route to Mapthe initial default route to the map page is /ustorelocator/location/map

Initial PageUpon map page load, all applicable locations will be displayed. Locations can be limited by several factors:

1. If you have the Default Country configured in main config, locations from that country only will be shown.

2. only locations associated with the current store or no store at all will be displayed. this is set up per location.

3. If a search is made, then only locations matching the above conditions and fulfilling search criteria will showw.

If the Default Location Address is selected, it will be centered on the map and zoomed in after the map loads.

Page 15: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 16

UStoRELocAtoR | MAGENto 2

UNIRGY

Map Page Elementsthe map page consists of a few key areas:

Search Form Here you perform searches for locations near you.

Locations Sidebar the initial location list, search results list, and directions list will be displayed in the sidebar.

Map Standard features include a Google map that can be displayed as a road map or satellite

image map. It also displays each location’s map pin and info window.

Map Footer the footer contains list of tags, a Show All, and a Reset Locations text button.

Page 16: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 17

UStoRELocAtoR | MAGENto 2

UNIRGY

Using the mapthe map can be panned and zoomed using the default Google map controls. When you click on a sidebar entry, it is centered

on the map and zoomed at its pre-defined zoom level. (the default map zoom level is used if the location does not have this

defined.) An info window also pops up on the map displaying location information such as title, display address, phone, web,

or e-mail link. clicking on any of the tags below the map filters the current list of locations by those tags. only locations that

have a clicked tag in their Store type list will be shown. to show all current locations, click the “Show all “link next to tags.

After performing a search, a new list of locations is loaded. Most often it will be a sub-selection of the initial locations. to

show all initial locations click “Reset locations”.

Page 17: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 18

UStoRELocAtoR | MAGENto 2

UNIRGY

Searchingthe search box above the map allows users to search for store locations placed within a pre-selected radius from the

searched address. Users can choose for search terms anything that Google understands. this includes exact addresses,

location names, landmark names, and zip codes. only locations falling within the selected radius will be considered. A user

can also search for a specific location using its name or part of it. When performing a search by name, radius is not taken

into account.

Page 18: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 19

UStoRELocAtoR | MAGENto 2

UNIRGY

DirectionsAfter performing a search and receiving results, the user has the option to get directions from search position to any of the

listed results. to do that, the user must click on the “Get directions” button beneath each result location.

this will result in a list of turn-by-turn directions below the result location and route line displayed on the map. By clicking

on each step the user will be shown a closer view of that section of the route. At present only driving directions are available.

Note: if search performed is by store name, directions are not available.

Page 19: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 20

UStoRELocAtoR | MAGENto 2

UNIRGY

turn by turn directions

Page 20: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 21

UStoRELocAtoR | MAGENto 2

UNIRGY

customizationAll elements of the page have class names and IDs that allow for customization of the map and form appearance. Featured

locations by default have a “featured” class assigned that is very lightly emphasized by default with bold red text.

Sidebar entries, marker info window contents, and direction elements can be greatly modified from within:

/app/design/frontend/base/default/template/unirgy/storelocator/map.phtml 

An example:

Page 21: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 22

UStoRELocAtoR | MAGENto 2

UNIRGY

All entries are generated by customizable JavaScript code. You can provide your own functions to alter the HtML created.

Each function accepts a location object in JSoN format.

{

“location_id”: “43”,

“title”: “1 Clermont Supercenter Store #5299 “,

“address”: “550 Us Highway 27, Clermont, FL 34714”,

“latitude”: “28.3544277000”,

“longitude”: “-81.6765845000”,

“address_display”: “Clermont \r\nSupercenter Store #5299”, “notes”:

“”,

“website_url”: “http:\/\/www.walmart.com”,

“phone”: “(352) 536-2750”,

“product_types”: “wholesale”,

“udropship_vendor”: null,

“country”: “US”,

“stores”: “1”,

“icon”:”http:\/\/wtsergo.unirgy.com\/sof\/magento\/media\/storelocator\/

locations\/icons\/toys.png”,

“use_label”: “0”,

“is_featured”: true,

“zoom”: “10”,

“units”: null,

“distance”: null,

“icon_width”: 32,

“icon_height”: 37

}

When initializing the store locator, the JavaScript object accepts a configuration object with the following structure:

{

mapEl: ,// id of HTML element that will load the map,

sidebarEl: ,// id of HTML element that will hold sidebar,

searchUrl: ,// search backend URL, DO NOT CHANGE IT unless you modify backend

too,

scale_icon: ,// boolean flag to scale custom icons or not, initial_locations: ,//

a list of initial locations, they are generated on the page, do not modify this

unless you understand what to provide as data,

min_zoom: ,// minimal map zoom, it is taken from store configuration,

Page 22: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 23

UStoRELocAtoR | MAGENto 2

UNIRGY

defaultLocation: ,// default location ID,

units: ,// map units, it is taken from store configuration, route_not_found: ,//

error message displayed when directions route cannot be found,

generateSidebarHtml: ,// a function that must return HTML string which will

be displayed as a single sidebar location, it accepts as only argument a JSON

encoded location,

generateDirectionsElement: ,// a function that must return HTML string which

will be displayed as “Get directions button” and empty container for step by step

directions list, it accepts as only argument a JSON encoded location,

generateMarkerHtml: ,// a function that must return HTML string which will be

displayed as a single location info window, it accepts as only argument a JSON

encoded location,

}

If you decide to provide custom HtML generation functions, make sure to keep any classes and IDs used to preserve all

functionality.

Page 23: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 24

UStoRELocAtoR | MAGENto 2

UNIRGY

Use in a cMS page/blockIf you want to show locations as part of a cMS page or static block, you can do so by adding the following where you want to

see the map:

{{block type=”ustorelocator/map” template=”unirgy/storelocator/map.phtml”}}

this alone, however, is not enough. You also need to import the JavaScript files that are used by the module. to do so you

need to add to Design tab > Layout Update XML the following:

<reference name=”head”>

<action method=”addJs”><script>storelocator/map.js</script></action>

<action method=”addCss”><stylesheet>css/storelocator.css</stylesheet></action>

</reference>

the above can be done for cMS pages only. If you are using the block in a cMS static block you should find another way of

adding the above XML layout update.

Page 24: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 25

UStoRELocAtoR | MAGENto 2

UNIRGY

UI Source Filesthe simplest way to add the uStoreLocator® to your site is to build a page and create a custom map URL in the System >

configuration > General section. However, if you want to add a map to a pre-existing page rather than using a custom map

URL, you can access all of the style files and copy the code to manually embed the map wherever you would like. You can

easily add a map to multiple pages if you wish to display it in more than one place. (For example, you may wish to show the

map on both a Product page and a Dealer page.)

You might also want to add custom preferences such as a specific color or style for the Store Locator. While we do not have

configuration settings for these changes, you can add them by making small edits the source code.

Below are all of the files needed to make custom alterations::

HtML and PHP:

app/design/frontend/base/default/template/unirgy/storelocator/map.phtml

cSS:

skin/frontend/base/default/css/unirgy/storelocator.css

JavaScript:

js/storelocator/map.js

XML:

app/design/frontend/base/default/layout/ustorelocator.xml

Page 25: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 26

UStoRELocAtoR | MAGENto 2

UNIRGY

Importing Locations

cSV ImportLocation data can be imported to Magento by uploading a cSV file in the main configuration (13).

the file format has to be similar to the example below. the most compatible and comfortable way for editing cSV files is by

using the openoffice calc application.

locations.csv

“title”,”address”,”latitude”,”longitude”,”address_display”,”notes”,”website_

url”,”phone”,”product_types”,”udropship_vendor”,”country”,”stores”,”icon”,”use_

label”,”is_featured”,”zoom” “1 Clermont Supercenter Store #5299 “,”550

Us Highway 27, Clermont, FL 34714”,”28,3544277”,”-81,6765845”,”Clermont

Supercenter Store #5299”,,”http://www.walmart.com”,”(352)

536-∂2750”,”wholesale”,,”US”,1,”/storelocator/locations/icons/toys.png”,0,1,10

“Clermont Supercenter Store #2695”,”1450 Johns Lake Rd, Clermont, FL

34711”,”28,531204”,”-81,732663”,”Clermont Supercenter Store #2695”,,”http://

www.walmart.com”,”(352) 243-6151”,”wholesale,electronics”,,”US”,1,”/

storelocator/locations/icons/uicon.png”,0,0,15 “12 Lakeland Supercenter Store

#1245 “,”5800 Us Highway 98 N,Lakeland, FL 33809”,”28,118823”,”-81,97638”,”12

Lakeland Supercenter Store #1245 “,,”http://www.example.com”,”(863)

859-3626”,”wholesale,toys”,,,1,”/storelocator/locations/icons/Koala-500w.

png”,0,1,18

Manual Import to manually import locations, you can simply set an address in the Geo Location section under CMS > Store Locations >

Location Information > Geo Location. If you type the address, into Address for geo location, the Longitude and Latitude

will populate automatically.

Page 26: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 27

UStoRELocAtoR | MAGENto 2

UNIRGY

If you want to make sure that the coordinates are exact, you can copy the coordinates from Google. Google does not list

Southern and Western coordinates as negative numbers, so you will need to add the minus signs yourself to directions with

negative longitudes or latitudes.

IMPoRtANt

When importing locations that have coordinates of 0, an attempt will be made to fill in these coordinates from Google. there

is, however, a limit of about 20 geo location lookups per second from the same origin. (the exact number is not stated.) this

means that bigger files with empty location coordinates will start failing to fetch them from Google at some point. A solution

is to split imported data on smaller files and import at intervals. We are working on a solution to this, but it will involve some

delays between requests. this issue will also delay the import process, but at least it will take place in one go.

Exportingto export locations go to System > Configuration > Store Locations, open General settings if they are not open, and click

the “Export Locations” button.

Page 27: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 28

UStoRELocAtoR | MAGENto 2

UNIRGY

Uninstalling uStoreLocator®

to disable the module, edit the file: app/etc/modules/Unirgy_StoreLocator.xml

Make sure that

<active>true</active>

is changed to:

<active>false</active>

Disabling from Admin System>Configuration>Advanced is not going to work.

If full removal is needed, then all of the extension’s files should be removed. these are:

• app/etc/modules/Unirgy_StoreLocator.xml

• app/code/community/Unirgy/StoreLocator/

• app/design/frontend/base/default/layout/ustorelocator.xml

• app/design/frontend/base/default/template/unirgy/storelocator/

• js/storelocator/

• app/locale/en_US/Unirgy_StoreLocator.csv

• skin/frontend/base/default/css/storelocator.css

If you want to remove all database traces of the module you should:

DROP TABLE `ustorelocator_location`;

and

DELETE FROM `core_resource` WHERE `code` LIKE ‘ustorelocator_setup’ LIMIT 1;

You may need to adjust the above lines to account for the table prefix. Any traces of the module should now be removed.

Remember to flush the cache and re-run the compilation if you use it.

Page 28: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 29

UStoRELocAtoR | MAGENto 2

UNIRGY

Video DemonstrationSee an eight-minute video demonstration of uStoreLocator® and learn how to quickly implement the extension on your

website. In just a matter of minutes you can set up the map so that customers can locate your store, distributors, services, or

other locations. You can easily add configurations and customize the map with your own icons and user interface settings.

https://unirgy.com/products/ustorelocator/#tab-preview

Page 29: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

©UNIRGY 2018 | PAGE 30

UStoRELocAtoR | MAGENto 2

UNIRGY

Contact Us

our extensions come with unlimited support from our engineers. For questions about uStoreLocator®, please contact us at

[email protected]. You may also call us +1 (503) 298-6894.

Visit our website to see the latest information about our extensions and view similar products that may be useful for your

Magento application: https://unirgy.com/

Page 30: USER GUIDE uStoreLocator - Marketplace...UStoRELocAtoR | MAGENto 2 UNIRG 4. open terminal or SSH session to the server. 5. Execute: cd  php bin/magento module:enable

UNIRGY

12042 SE Sunnyside Rd, #300Clackamas, Oregon 97015

68 Jay Street, Suite 201Brooklyn, New York 11201

1-503-405-9724 [email protected] www.unirgy.com

UNIRGY