Ajax Stock Store Locator
This section describes the methods available within the "Store Locator" family of Ajax methods. Using these methods you can access stores and view their stock levels.
The intention of this article is to give the reader detailed information about how and where they can get information from Store Locator.
searchByBasket
Permission Required: None
Method Call: /ajax/Ajax_Frontend_Store_Locator/searchByBasket
Aurora Demo Example URL: http://www.aurorademo.co.uk/basket/
The Store Locator is used when selecting one of either the "Pay & Collect" or "Reserve & Collect" shipping options to select a store for collection.
Aurora Demo Example:
- templates/example.com/store-finder/search-by-basket-store-list.html
The searchByBasket method allows you to search for nearby stores using the contents of the visitor's basket to check stock availability (in the returned stores).
Request Parameters
Variable | Values | Required | Description |
---|---|---|---|
store_id | Integer | No | The internal ID Aurora uses to uniquely identify a store location. |
internal_store_number | String | No | The internal store number. |
quantity | Integer | No | Quantity of the product which needs to be checked. |
postcode | String | One of Postcode, Search, Country, Country_id or Long & Lat must be provided | Postcode used for the search. |
search | String | One of Postcode, Search, Country, Country_id or Long & Lat must be provided | Search term for the search. |
country | String | One of Postcode, Search, Country, Country_id or Long & Lat must be provided | Search by country. |
country_id | String | One of Postcode, Search, Country, Country_id or Long & Lat must be provided | Internal country ID. |
longitude | Float | One of Postcode, Search, Country, Country_id or Long & Lat must be provided | The longitude to use for the ‘centre’ of the search. Not supported. |
latitude | Float | One of Postcode, Search, Country, Country_id or Long & Lat must be provided | The latitude to use for the ‘centre’ of the search. Not supported. |
template_name | String | No | This will be the name of the Front-end Template that the requester would like to use. Example: search-by-basket-store-list.html. This template will only be searched for in the store-finder directory. If no template name is provided, then the data will be returned as a JSON array. |
service_type | rc | cc | No | This allows the requester to stipulate which services it is attempting to search. It will accept a comma-delimited string of values. Note: If this value is not provided then Aurora will simply check all configured/enabled services (as it does right now). This setting is not supported by all 3rd party providers and so its behaviour with any one specific provider should be checked on a case-by-case basis. |
dont_check_stock | 1 | No | This parameter disables the store stock checks that are performed by some 3rd Party services and needs to be passed for all pages that are using the store locator and do not need to make a stock check. |
Response Variables
Variable | Values | Description |
---|---|---|
stores | Array | All the information for the stores. Only one of ‘html’ or ‘stores’ will be provided (not both), based on the presence of the "template_name" request parameter. |
stores.id | Integer | The Internal ID used to uniquely identify this Store. |
stores.type | String | This indicates whether or not the Store is an actual physical store. |
stores.name | String | The name of the Store. |
stores.address_1 | String | The first line of the Store’s address. |
stores.address_2 | String | The second line of the Store’s address. |
stores.town | String | The town from the Store’s address (if available). |
stores.county | String | The county from the Store’s address (if available). |
stores.country_id | Integer | The Internal ID used by Aurora to uniquely identify the country from the Store’s address. |
stores.postcode | String | The postcode from the Store’s address. |
stores.filename | String | The ‘URL safe’ name for the Store. |
stores.opening_hours | String | The opening hours as described in Aurora (or the 3rd Party Service Provider). |
stores.collect_in_store | Integer | Can this store accept orders for click and collect? |
stores.reserve_and_collect | Integer | Can this store accept orders for reserve and collect? |
stores.telephone | String | The telephone number for the Store. |
stores.lat | Float | The latitude value for the Stores location (if available). |
stores.lng | Float | The longitude value for the Stores location (if available). |
stores.fascia_store_code | String | |
stores.store_fascia | String | |
stores.distance | Float | The number of miles from the ‘centre’ of the search. |
stores.next_collection_time | Integer | The next time this store will receive a collection, as a Unix Timestamp. |
stores.next_collection_string | String | The next time this store will receive a collection, as a date string. |
stores.shipping_charge | Float | The cost that will be charged for using this Store for the selected shipping method (if applicable). |
stores.url | String | This URL for the Aurora Store. |
stores.products | Array | An array of Product SKU’s and available stock levels for each product at said store. |
stores.products.sku | String | The Aurora Product/Variation Reference for the Product/Variation in question. |
stores.products.product_id | Integer | The Internal Aurora ID used to Uniquely identify a product in Aurora. |
stores.products.store_stock | Integer | The stock available at this Store, for use with Reserve and Collect. |
stores.products.basket_id | Integer | The Internal Aurora ID used to Uniquely identify a line in the current visitor’s basket. |
total_stores | Integer | The number of Stores returned. |
html | String | This will be the merged data, resulting from the use of the Front-end Template stipulated in the Ajax request variable called template_name. Only one of ‘html’ or ‘stores’ will be provided (not both), based on the presence of the "template_name" request parameter. |
Template Variables
For more detail on what variables are available to you within the Templates used by these Ajax Endpoints, please see the Store Locator - Template Variables Support Article.
searchByProduct
Permission Required: None
Method Call: /ajax/Ajax_Frontend_Store_Locator/searchByProduct
Aurora Demo Example URL: https://demo.auroracommerce.com/00100023945/00100023945
Aurora Demo Example:
- templates/example.com/store-finder/search-by-product-store-list.tpl.html
- templates/example.com/_js/productdetails.js
- templates/example.com/_js/product-details-common.js
- templates/example.com/products/details.tpl.html
See the following UI on the URL provided above that demonstrates this feature.

This endpoint allows you to check the stock availability of a specific product (or variation thereof, e.g. a specific size of a particular dress) for stores nearby the specified location (e.g. postcode or town name).
Request Parameters
Variable | Values | Required | Description |
---|---|---|---|
product_id | Integer | One of Product or Variation ID or Reference must be provided. | The Internal ID Aurora uses to uniquely identify a product. |
variation_id | Integer | One of Product or Variation ID or Reference must be provided. | The Internal ID Aurora uses to uniquely identify a product variation. |
product_reference | String | One of Product or Variation ID or Reference must be provided. | The Product Reference/SKU Aurora uses to uniquely identify a product. |
variation_reference | String | One of Product or Variation ID or Reference must be provided. | The Product Reference/SKU Aurora uses to uniquely identify a product variation. |
store_id | Integer | No | The Internal ID Aurora uses to uniquely identify a store location. |
internal_store_number | String | No | The internal store number. |
quantity | Integer | No | Quantity of the product which needs to be checked. |
postcode | String | One of Postcode, Search, Country, Country_id or Long & Lat must be provided | Post code used for the search. |
search | String | One of Postcode, Search, Country, Country_id or Long & Lat must be provided | Search term for the search. The term can be used with longitude and latitude coordinates. Example value for search: latitude,longitude |
country | String | One of Postcode, Search, Country, Country_id or Long & Lat must be provided | Search by country. |
country_id | String | One of Postcode, Search, Country, Country_id or Long & Lat must be provided | Internal country id. |
longitude | Float | One of Postcode, Search, Country, Country_id or Long & Lat must be provided | The longitude to use for the ‘centre’ of the search. Not supported. |
latitude | Float | One of Postcode, Search, Country, Country_id or Long & Lat must be provided | The latitude to use for the ‘centre’ of the search. Not supported. |
template_name | String | No | This will be the name of the Front-end Template that the requestor would like to use. Example: search-by-basket-store-list.html. This template will be only searched for in the store-finder directory. If no template name is provided then the data will be returned as a JSON array. |
service_type | rc | cc | No | This allows the requestor to stipulate which services it is attempting to search. It will accept a comma-delimited string of values. Note: If this value is not provided then Aurora will simply check all configured/enabled services (as it does right now). This setting is not supported by all 3rd party providers and so its behaviour with any one specific provider should be checked on a case-by-case basis. |
dont_check_stock | 1 | No | This parameter disables the store stock checks that are performed by some 3rd Party services and needs to be passed for all pages that are using the store locator and do not need to make a stock check. |
Response Variables
Variable | Values | Description |
---|---|---|
stores | Array | All the information for the stores. Only one of ‘html’ or ‘stores’ will be provided (not both), based on the presence of the "template_name" request parameter. |
stores.id | Integer | The Internal ID used to uniquely identify this Store. |
stores.type | String | This indicates whether or not the Store is an actual physical store. |
stores.name | String | The name of the Store. |
stores.address_1 | String | The first line of the Store’s address. |
stores.address_2 | String | The second line of the Store’s address. |
stores.town | String | The town from the Store’s address (if available). |
stores.county | String | The county from the Store’s address (if available). |
stores.country_id | Integer | The Internal ID used by Aurora to uniquely identify the country from the Store’s address. |
stores.postcode | String | The postcode from the Store’s address. |
stores.filename | String | The ‘URL safe’ name for the Store. |
stores.opening_hours | String | The opening hours as described in Aurora (or the 3rd Party Service Provider). |
stores.collect_in_store | Integer | Can this store accept orders for click and collect? |
stores.reserve_and_collect | Integer | Can this store accept orders for reserve and collect? |
stores.telephone | String | The telephone number for the Store. |
stores.lat | Float | The latitude value for the Stores location (if available). |
stores.lng | Float | The longitude value for the Stores location (if available). |
stores.fascia_store_code | String | |
stores.store_fascia | String | |
stores.distance | Float | The number of miles from the ‘centre’ of the search. |
stores.next_collection_time | Integer | The next time this store will receive a collection, as a Unix Timestamp. |
stores.next_collection_string | String | The next time this store will receive a collection, as a date string. |
stores.shipping_charge | Float | The cost that will be charged for using this Store for the selected shipping method (if applicable). |
stores.url | String | This URL for the Aurora Store. |
stores.products | Array | An array of Product SKU’s and available stock levels for each product at said store. |
stores.products.sku | String | The Aurora Product/Variation Reference for the Product/Variation in question. |
stores.products.product_id | Integer | The Internal Aurora ID used to Uniquely identify a product in Aurora. |
stores.products.store_stock | Integer | The stock available at this Store, for use with Reserve and Collect. |
stores.products.basket_id | Integer | The Internal Aurora ID used to Uniquely identify a line in the current visitor’s basket. |
total_stores | Integer | The number of Stores returned. |
html | String | This will be the merged data, resulting from the use of the Front-end Template stipulated in the Ajax request variable called template_name. Only one of ‘html’ or ‘stores’ will be provided (not both), based on the presence of the "template_name" request parameter. |
Template Variables
For more detail on what variables are available to you within the Templates used by these Ajax Endpoints, please see the Store Locator - Template Variables Support Article.
Updated over 2 years ago