2.0 Beta

Smootify 2.0 is in public beta. Your 1.x store keeps working. Move when you want.

What changed

Pickup and store locator

Show on the product page where the selected variant can be picked up, list the other stores, and put your stores on a Mapbox map with a search field.

v2.0 beta
Open .md1.x page ↗
On this page
  1. 1. Pickup on the product page
  2. 2. A store locator page
  3. Before you publish

If your store has shops or warehouses where customers pick up their orders, Smootify can show them. On the product page, store-availability says whether the selected variant can be picked up, and where. On a page of its own, store-locator shows every store on a map, with a list the visitor can search. This page covers both.

Note

Both read your Shopify locations that offer local pickup. Add the locations under Settings > Locations, turn on local pickup for each one under Settings > Shipping and delivery, and set each product’s stock per location on the product. The store locator also needs a free Mapbox account, and the Lite or Server plan on your custom domain. On your .webflow.io address it works on every plan.

1. Pickup on the product page

Add a Custom element with the tag store-availability inside smootify-product. Outside it, the element is removed.

Example structure of the Navigator
store-availabilityCustom Element
Div Blockcondition=available-at-location
Text“Pick up at”
Text Span“Store”location=name
Div Blockcondition=not-available-at-location
Text“Not in stock at”
Text Span“Store”location=name
Text Block“Usually ready in 24 hours”location=pick-up-time
buttonCustom Elementtype=button
Text“Check other stores”
Div Blockpopover=auto
store-locationCustom Element
Text Block“Store”location=name
Text Block“Address”location=address
Text Block“0”location=quantity

The first store. Outside the list, the location attributes show the first pickup location Shopify gives for the selected variant, and they follow the variant as it changes:

AttributeWhat it shows
location="name"the location’s name
location="address"its address, on several lines
location="quantity"how many are available there
location="pick-up-time"Shopify’s pickup time, such as “Usually ready in 24 hours”
location="directions-link"on a link: a Google Maps route to it

Its states. Inside store-availability, conditions show what the first location has, and classes follow it. Design these states:

The first store has it

Condition
available-at-location shows.
Classes
is-available on store-availability, is-available-at-pickup on smootify-product.

The first store does not have it

Condition
not-available-at-location shows.
Classes
is-available-at-pickup on smootify-product: other stores can still have it.

No store offers pickup for the variant

Condition
not-available-as-local-pickup shows, elsewhere in smootify-product.
Hidden
store-availability, with all it holds.

The other stores, in the panel

List
One store-location per store that offers the variant, except the store chosen in a location switcher. It loads when the panel opens.
Button
Hidden when there is only one location.

The other stores. For a list of every store that offers the variant:

  1. Inside store-availability, add a panel: a Div block with the custom attribute popover set to auto, or a Custom element with the tag dialog.
  2. Inside the panel, add a Custom element with the tag store-location: the template of one store, with the same location attributes. Smootify copies it once per store, except the store the visitor chose in a location switcher.
  3. Outside the panel, add a Custom element with the tag button, such as “Check other stores”. It opens the panel.

Without a panel, the button is removed. Add skeleton="text" inside store-location for a placeholder while it loads. With a dialog, the custom attributes animation-name, animation-duration and disable-blur on store-availability style its opening, as on the market suggestion.

Every value is in pickup attributes and pickup conditions.

2. A store locator page

Get a Mapbox token. In your Mapbox account, create a token with the default public scopes, and limit it to your site’s addresses (your .webflow.io address and your domain). Copy it: it is public, and it goes in the page.

Which stores are listed. The list comes from Shopify, not from Webflow: Smootify asks Shopify for your store’s locations that offer local pickup, up to 200, and makes one store-location per location.

  • A location is listed only when, in Shopify, it is active under Settings > Locations, it fulfils online orders (Fulfill online orders from this location), and local pickup is turned on for it under Settings > Shipping and delivery > Local pickup. A warehouse or a shop without local pickup is never listed.
  • The name, address and phone are the ones set on the location in Shopify. Change them there: the page follows.
  • The map places each store at the coordinates Shopify finds for its address. A location whose address Shopify cannot place stays in the list without a marker.
  • Stock does not matter here: the locator lists the stores, not the products they have.

Build the locator. Add a Custom element with the tag store-locator and give it the custom attribute data-api-key with your token. Inside it go these parts, each a Custom element with that tag unless the card says otherwise:

map

The map is drawn in it. Give it a height in its styles.

Without it
The store locator is removed.
store-location

The template of one store in the list.

Without it
There is no list.
map-marker

The marker of each store on the map. Design it as you like, such as an icon.

Without it
The map has no markers.
store-popupoptional

The card that opens over a marker when it is clicked.

Without it
A click on a marker moves the map and marks its store, with no card.
Name: queryoptional

A Text field in a Form Block. It searches the list as the visitor types: the city, the postal code…

Without it
The list is not searched.
no-storesoptional

An element with this condition, inside store-locator. It shows while no store matches the search.

Without it
An empty list.
Example structure of the Navigator
store-locatorCustom Elementdata-api-key=Mapbox public token
mapCustom Element
Form Block
Form
Text FieldName “query”
store-locationCustom Element
Text Block“Store”location=name
Text Block“Address”location=address
Text Link“Directions”location=directions-link
map-markerCustom Element
store-popupCustom Element
Text Block“Store”location=name

What the visitor gets.

  • The browser asks the visitor for their position. With it, the stores are sorted by distance and the map starts there. Without it, the map starts at the first store.
  • A click on a store in the list moves the map to it, and the store gets the class is-active. A click on a marker opens its store-popup and marks its store in the list.
  • The search field filters the list as the visitor types.

Inside store-location and store-popup, location shows name, address, zip, phone (a Text link with it calls the number), country and directions-link.

Map options, as custom attributes on store-locator:

  • data-style: the style URL of a Mapbox Studio style, mapbox://styles/mapbox/light-v11 by default;
  • data-initial-zoom: the zoom when the map opens, 13 by default;
  • data-zoom: the zoom when the map moves to a store, 13 by default;
  • data-fit-bounds: true by default, the map zooms out to show every store; false keeps the initial zoom;
  • data-padding: the space kept around the stores when the map fits them, 100 pixels by default.

More in store-locator and its attributes.

Before you publish

Check these first

  • The pickup block never shows. No location offers the variant for pickup: turn on local pickup for the location, and check the product’s stock there.
  • The “Check other stores” button disappears. There is only one pickup location, or the button has no panel to open inside store-availability.
  • The store locator disappears. It has no data-api-key, no map element inside, or the store has no location with local pickup.
  • A store is missing from the locator. In Shopify, the location is inactive, does not fulfil online orders, or has local pickup turned off.
  • The map shows no markers. The map-marker template is missing.
  • The store locator works on .webflow.io but not on your domain. It needs the Lite or Server plan there.

    ↑ ↓ to moveEnter to openEsc to close