Smootify is JS dev friendly! It exposes many Events and APIs that you can use to further customize and enrich your Webflow site and react to user actions!
Global Events
Below all usefull events that you can listen up on the document element
API Loaded
This event get’s dispatched on the document after all Smootify modules have been loaded.
User Auth Change
This event get’s dispatched on the document on login status change and on page load to notify if an user is effectively logged in or not
Cart Updated
This event get’s dispatched on the document on any cart changes (also on the cart first load)
Added to Cart
This event get’s dispatched on the document on any add to cart event
Removed from Cart
This event get’s dispatched on the document on any product removed from the cart
Product Loaded
This event get’s dispatched on the document for each Product Loaded from the API
Product Wrapper Events
Below you can instead find all the events that are dispatched only on the Smootify Product DOM Element
Variant Change
This event get’s dispatched each time a new Variant has been selected
Plan Change
This event get’s dispatched each time the Variant plan changed
APIs
Below you can find all methods exposed by Smootify to further enhance your Webflow project
The Smootify instance is exposed only after the APIs are loaded, so be sure to wrap all your code inside the API Loaded callback, e.g:
Query
It allows you to access the whole storefront graphql api without thinking about any fetch call, tokens and all the rest
Query Customer
It allows you to query customer fields for the current logged in customer, it can automatically fetch either from the old or new customers account APIs based on if you are using passwordless login or not. This is not the full Customer Accounts Api but is limited to only query the Customer object, schemas below: