Methods
JS API Methods
showReserveModal()
showReserveModal()
Opens the Reserve In-Store modal so the shopper can place a new reservation.
Example: Custom button to open the reserve modal
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()
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.
on(string event, function callback)
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:
push(string method, object data)
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)
getLocation(function callback)
Get the shopper's current preferred or geolocated nearest store location.
Example: Get currently preferred location
getLocations(function callback)
getLocations(function callback)
Get all the store locations available for selection by the shopper.
Example: Get all the available store locations.
getProduct()
getProduct()
Get the product that the system currently detects that the shopper is looking at.
Example: Get the current product ID
getVariant()
getVariant()
Get the product variant that the system currently has selected.
Example: Get the current variant ID
Last updated