Settings
Modify Smootify behaviour by using a configuration script
Options Customizer
Don't worry if you don't feel brave enough to write your own JS configuration script! just use the customizer below to generate the proper script!
How to customize Smootify behaviour
Smootify can be customized using a simple configuration script that can be added inside the global head custom code section of your Webflow Project.
The script you add to change up options must go before the Smootify main script, otherwise it will not be read on all page loads, since our Cloudflare CDN is too fast 🚀
Below you can find the Typescript schema of all Smootify Options available at the moment.
You can change all or only some of the options by adding a script on the global head custom code section of your Webflow project settings. For example, the snippet below will force Smootify Product images to show up only images that are connected to the current selected variant.
You should not add multiple scripts to customize the options! JS is a top-down language, if you write 2 scripts that do set a variable, only the second script will work, unless you properly spread the previous options!
For reference below there are the default options that Smootify will use in the case the previous script is not added inside the project:
You can naturally change all of the options or only some of them, like in the example below:
Available Options
The complete list of customizable Smootify properties is provided below.
Prop | Type | Default |
---|---|---|
showOnlyActiveImages? | boolean | false |
productsBase? | string | product |
collectionsBase? | string | collection |
vendorsBase? | string | vendor |
accountsBase? | string | account |
invalidProductRedirectUrl? | string | window.location.origin |
newCustomerAccountsPublicKey? | string | - |
newCustomerLoginRedirect? | string | window.location.origin |
accountPageRedirectTo? | string | / |
orderPageUrl? | string | /account/order |
subscriptionPageUrl? | string | /account/subscription |
selectMarketBasedOnBrowserLanguage? | boolean | false |
enableAutoTrack? | boolean | false |
useBrowserFormatter? | boolean | false |
preload? | boolean | true |
cacheDuration? | number | - |