2.0 Beta

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

What changed

Recently viewed

Show the products a visitor opened last, on any page, from their browser or, for logged-in customers, from their account.

v2.0 betaAdd-on: Last Viewed
Open .md1.x page ↗
On this page
  1. What counts as viewed
  2. Show the list
  3. Before you publish

Recently viewed products help a visitor go back to what they looked at. Smootify records each product page the visitor opens and gives you a card template to list those products anywhere: on the home page, in the cart, under a product. There is nothing to record by hand.

Note

Turn on Last Viewed in the Smootify dashboard. It is free on every plan. On your .webflow.io address it works for testing before you turn it on, but only turning it on adds the customer metafield Last Viewed (custom.last_viewed, a list of products) to Shopify, where a logged-in customer’s list is saved. In Shopify, under Settings > Custom data > Customers, check that this definition has Customer accounts access set to Read and write: Smootify creates it that way, but a definition that already existed keeps its own setting.

What counts as viewed

  • A product page. A product is recorded when the visitor opens its page: the template page of your Products collection, at the address your site uses for products (products by default, set by the productsBase option). A product seen in a card, a search result or the cart is not recorded.
  • The 10 most recent. The newest comes first. Opening a product again moves it to the front. On a product page, that product is already first in the list.
  • Browser and account. Every visitor’s list is kept in their browser. For a customer logged in with customer accounts, it is also saved in their account, and the account list is the one shown when there is one.

Show the list

Add a Div block for the grid, and inside it a smootify-product with the custom attribute data-id="last-viewed". Design it as one product card: Smootify copies it once per product, and the copies go next to it. Only the first smootify-product with data-id="last-viewed" on the page is used.

Example structure of the Navigator
Div Blockcondition=has-items-in-last-viewed
HeadingH2“Recently viewed”
Div Block
smootify-productCustom Elementdata-id=last-viewedlimit=4
Link Blockproduct=link
Imagevariant=image
Text Block“Product”product=title
smootify-priceCustom Element
Text Block“$0.00”data-prop=price
  • limit sets how many cards show, 10 by default. Smootify keeps 10 products, so a higher number shows no more.
  • Inside the card, everything a product card can show works: see Product cards. Each card has the class is-last-viewed-item.

Empty or not. Two conditions work anywhere on the page, as around the heading above:

has-items-in-last-viewed

The list has products

Shows
While the list has at least one product.
Body
has-last-viewed, on the body only, not on the card template.
no-items-in-last-viewed

The list is empty

Shows
While the list is empty: until the visitor opens a product page.
Body
No has-last-viewed.

More in the recently viewed cards.

Before you publish

Check these first

  • The list stays empty. The product pages are not at the address Smootify expects. If your Products collection uses another URL, such as product, set productsBase in the Smootify options.
  • Nothing is recorded on the live site. Last Viewed is not turned on in the Smootify dashboard.
  • The list does not follow the customer to another device. The customer is not logged in with customer accounts, or the Last Viewed metafield does not have Read and write customer accounts access in Shopify.
  • Never more than 10 cards. Smootify keeps the 10 most recent products, whatever the limit.

    ↑ ↓ to moveEnter to openEsc to close