Methods

JS API Methods

showReserveModal()

Opens the Reserve In-Store modal so the shopper can place a new reservation.

Example: Custom button to open the reserve modal

<button onclick="ris.showReserveModal();">Show Reserve Modal</button>

Product/Variant Context

If the user is currently looking at a product the reserve modal will assume that the customer wants to reserve the current product in store.

Shopping Cart Context

If the user is currently NOT looking at a product and a shopping cart is available, the the reserve modal will assume that the customer wants to reserve their entire cart in-store.

showChooseLocationModal()

Opens the "Choose Location" modal so the shopper can choose their preferred location that the app can default to from now on.

Example: Custom link to open the choose location modal.

<a href="#" onclick="ris.showChooseLocationModal()">Choose Preferred Location</a>

on(string event, function callback)

Adds a new event listener to the system for the specified event.

Example: Trigger alert log when reserve modal is submitted

See all Events at the events section for the JS API:

Events

push(string method, object data)

You can call JS API methods with the push buffer if you aren't totally sure if the Reserve In-store system has loaded yet.

Example: Trigger some code upon initialization of the reserve in-store system

getLocation(function callback)

Get the shopper's current preferred or geolocated nearest store location.

Example: Get currently preferred location

getLocations(function callback)

Get all the store locations available for selection by the shopper.

Example: Get all the available store locations.

getProduct()

Get the product that the system currently detects that the shopper is looking at.

Example: Get the current product ID

getVariant()

Get the product variant that the system currently has selected.

Example: Get the current variant ID

Last updated

Was this helpful?