# mageplaza/module-store-locator-graphql

> Magento 2 Store Locator GraphQl Extension

`composer require mageplaza/module-store-locator-graphql`

Canonical URL: https://packagento.com/mageplaza/module-store-locator-graphql

## At a glance

- **Vendor**: mageplaza (https://packagento.com/mageplaza.md)
- **Latest version**: 1.1.0 — released 2021-02-23
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/mageplaza/module-store-locator-graphql and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require mageplaza/module-store-locator-graphql:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Magento 2 Store Locator GraphQl Extension

## README

**Magento 2 Store Locator GraphQL is now a part of the Mageplaza Store Locator extension that adds GraphQL features. This supports PWA compatibility.**

[Mageplaza Store Locator for Magento 2](https://www.mageplaza.com/magento-2-store-locator-extension/) enables stores to show their addresses on the Internet and customers to locate the nearest store locations. 

The stores can get their locations to display online so that customers can easily find the store and conveniently see the location most convenient for them to come. They can get accurate directions to your store without any difficulty. That all your store’s locations show up when customers search on the Internet builds trust for them about your store. Imagine they can’t find your locations anywhere, you will be most likely to lose potential customers. 

Integrated with Google Maps and GPS, the extension enables customers to quickly find the nearest store by typing some letters in the search box. A noticeable icon marker will display when the store location is found. The store admin can also easily change their stores' location and preview the changes instantly right from the backend. 

At the sidebar of the store locator page, the store’s information will be displayed in detail, including photos preview in a slider. Customers can view the information quickly and choose the most suitable location. Moreover, the extension provides you with the four most-used map designs that are more outstanding and eye-catchy than the Default. You can also add more beautiful map designs that fit your store better or upload the icon marker with ease. 

The status of the store can be displayed according to the working hours and holidays you set for your store location from the backend. Your store can be set to “Open” during the working hour and “Close” when the working day ends. 

The local SEO is also supported. It helps local customers find the nearest store. Local SEO feature enables store owners to optimize for SEO by adjusting meta title, meta description, and keywords. 

Besides, the extension also supports store pick-up. Customers can choose the store they want to drop by and hand-pick their orders. This adds another shipping method to the online store that brings convenience to the customers’ shopping process. Customers can set up the available time for pick-up so that it’s better for the store to prepare the products for customers.  

### 1. How to install
Run the following command in Magento 2 root folder:

```
composer require mageplaza/module-store-locator-graphql
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
```
**Note:**
Magento 2 Store Locator GraphQL requires installing [Mageplaza Store Locator](https://www.mageplaza.com/magento-2-store-locator-extension/) in your Magento installation. 

### 2. How to use 
To start working with Magento 2 Store Locator, you need to: 
- Use Magento 2.3.x. Return your site to developer mode. 
- Set **DraphQL enpoint** `http:///graphql` in URL section. Click on Set endpoint. For example, `http://develop.mageplaza.com/graphq`
- Mageplaza supports query and mutation to view the information by locations by store, configuration by store, pickup config, etc. See more details [here](https://documenter.getpostman.com/view/10589000/SztEZmt8?version=latest#6c1f4cf8-b741-45c1-9b99-5cc684b1f737).

### 3. Devdocs
- [Magento 2 Store Locator API & examples](https://documenter.getpostman.com/view/10589000/SztD5nDd?version=latest)
- [Magento 2 Store Locator GraphQL & examples](https://documenter.getpostman.com/view/10589000/SztEZmt8?version=latest#6c1f4cf8-b741-45c1-9b99-5cc684b1f737)

Click on Run in Postman to add these collections to your workspace quickly.

![Magento 2 blog graphql pwa](https://i.imgur.com/lhsXlUR.gif)

### 4. Contribute to this module 
Feel free to **Fork** and contribute to this module. 

If you have any ideas, please create a pull request, then we will consider and merge your proposed changes in the main branch. 

### 5. Get support 
- Feel free to contact us if you have any questions. We highly appreciate your contribution to this post. if you have any problem and queries, our support team is also willing to help. 
- If you find it helpful, don't hesitate to leave a **Star** ![star](https://i.imgur.com/S8e0ctO.png)

## Changelog

CHANGELOG: https://www.mageplaza.com/releases/store-locator

## Recent Versions

| Version | Released |
|---|---|
| 1.1.0 | 2021-02-23 |
| 1.0.0 | 2020-06-30 |

## Quality

Latest release (1.1.0) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 1 | 1 | – | – |
| 2.4.8 | – | 1 | 1 | – |
| 2.4.9 | – | – | 1 | 1 |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Warning | 18 | 18 warnings (ruleset: Magento2) — 18 auto-fixable with phpcbf |
| PHPMD | Warning | 1 | 1 rule violation (UnusedFormalParameter:1) |
| Cpd | Pass | 0 |  |
| Composer validate | Info | 1 | valid; 1 advisory note (composer validate --strict) |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 36 | 36 | – | – |
| 2.4.8 | – | 36 | 52 | – |
| 2.4.9 | – | – | 52 | 52 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["mageplaza/module-store-locator-graphql"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

mageplaza is a Magento 2 vendor on Packagento. See https://packagento.com/mageplaza.md for their full catalogue.

