Docs

Installation

Shopyflow installation takes place in 2 simple steps.

  1. Configuring Shopify
  2. Connecting to Webflow

Configure Shopify

Shopyflow requires a Storefront API access token to securely connect your Shopify Store to your Webflow site. To generate your Store API access token;

  1. Head to your Shopify Admin > Settings > Apps and Sales Channels section and click Develop apps link..

What’s a Rich Text element? What’s a Rich Text What’s a Rich Text element? What’s a Rich Text element?

The rich text element allows you to create and format headings, paragraphs, blockquotes, images, and video all in one place instead of having to add and format them individually. Just double-click and easily create content.

What’s a Rich Text element? What’s a Rich What’s a Rich Text element? What’s a Rich Text ejklkjököbömnlement?What’s a Rich Text element? What’s a Rich Text element?

The rich text element allows you to create and format headings, paragraphs, blockquotes, images, and video all in one place instead of having to add and format them individually. Just double-click and easily create content.

Shopyflow requires a Storefront API access token to securely connect your Shopify Store to your Webflow site. To generate your Store API access token;

1. Head to your Shopify Admin > Settings > Apps and Sales Channels section and click Develop apps link.

What’s a Rich Text element? What’s a Rich What’s a Rich Text element? What’s a  element?What’s a Rich Text element? What’s a Rich Text element?

The rich text element allows you to create and format headings, paragraphs, blockquotes, images, and video all in one place instead of having to add and format them individually. Just double-click and easily create content.

Static and dynamic content editing

A rich text element can be used with static or dynamic content. For static content, just drop it into any page and begin editing. For dynamic content, add a rich text field to any collection and then connect a rich text element to that field in the settings panel. Voila!

A rich text element can be used with static or dynamic content. For static content, just drop it into any page and begin editing. For dynamic content, add a rich text field to any collection and then connect a rich text element to that field in the settings panel. Voila!

How to customize formatting for each rich text

Headings, paragraphs, blockquotes, figures, images, and figure captions can all be styled after a class is added to the rich text element using the "When inside of" nested selector system.

Free ON WEBFLOW.IO DOMAINS

Events

Events

Method
Utility
Shopyflow offers a number of events that you can hook up to and use to execute your custom logic.

Shopify Storefront data and cart logic is bound to your Webflow elements through Shopyflow attributes. Connecting your Webflow site to Shopify is done by adding custom attributes to your Webflow elements.

Yet, you are not required to type or edit attributes manually. Shopyflow provides you with the pre-configured components needed to create your store, as copyable Webflow elements right in Webflow designer.

All the copyable Shopyflow Components are native editable Webflow elements. There is no layout or styling limitation on any element.

In the below image hover your mouse on the hotspots to see all the required Shopyflow attributes to build a product page like this in Webflow

Webflow designer
Custom Attributes
sf-add-to-cart="1"
Custom Attributes
sf-change-quantity="1"
Custom Attributes
sf-change-option="{Option Name}"
Custom Attributes
sf-cart-count="1"
Custom Attributes
sf-change-option="{Option Name}"
Custom Attributes
sf-product="{Product ID}"
Custom Attributes
sf-show-image="1"
Attribute Name
Attribute Value
True or 1
Nesting Rule
Can be placed anywhere in the site
No items found.
Events
Method
Class name
Target elements
Can be placed anywhere in the site
No items found.

Webflow app usage

Webflow app settings

Component contents

Module contents

Available methods

Shopyflow Ready Event

Fires when Shopyflow JS library first loads and right before it starts processing your store.
Attribute Name
ShopyflowReady
Attribute Value
True or 1
Method
ShopyflowReady

Rest of the Shopyflow event listeners must be placed inside the ShopyflowReady event listener.
You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>
  window.addEventListener('ShopyflowReady', (event) => {
    // Run your code here
  });
</script>

Rest of the Shopyflow event listeners must be placed inside the ShopyflowReady event listener.
You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>
  window.addEventListener('ShopyflowReady', (event) => {
    // Run your code here
  });
</script>

Read more →

Buy Module Ready Event

Fires when Shopyflow finishes processing a Buy Module.
Attribute Name
buyModuleReady
Attribute Value
True or 1
Method
buyModuleReady

All product containers will trigger this event once they are processed by Shopyflow.
You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>

  /**
  * @param {HTMLElement}  el - product container element
  * @param {Product} product - the product associated with the Buy Module
  *
  * You can use the provided Shopyflow objects to implement custom logic.
  */
  
  window.addEventListener('ShopyflowReady', (event) => {
    Shopyflow.on('buyModuleReady', ({ el, product }) => {
      console.log('Product container:', el);
      console.log('Product', product);    
      // Run your code here
    })  
  });
  
</script>

All product containers will trigger this event once they are processed by Shopyflow.
You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>

  /**
  * @param {HTMLElement}  el - product container element
  * @param {Product} product - the product associated with the Buy Module
  *
  * You can use the provided Shopyflow objects to implement custom logic.
  */
  
  window.addEventListener('ShopyflowReady', (event) => {
    Shopyflow.on('buyModuleReady', ({ el, product }) => {
      console.log('Product container:', el);
      console.log('Product', product);    
      // Run your code here
    })  
  });
  
</script>

Read more →

Cart Update Event

Fires when cart is updated by a customer action.
Attribute Name
cartUpdate
Attribute Value
True or 1
Method
cartUpdate

Customer actions that will trigger a cart update event:

  • Add to cart
  • Increase cart item quantity
  • Decrease cart item quantity
  • Remove cart item
  • Empty cart
  • Apply discount code
  • Add cart note

You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>

  /**
  * @param {Cart}   cart - Shopify cart
  * @param {string} type - update event type
  * @param {any}    rest - rest of the objects that are returned
  *
  * You can use the provided Shopyflow objects to implement custom logic.
  */
  
  window.addEventListener('ShopyflowReady', (event) => {
    Shopyflow.on('cartUpdate', ({ cart, type, ...rest }) => {
      console.log('Event type:', type);
      console.log('Cart:', cart);
      console.log('Rest of the event objects:', rest);   
      // Run your code here
    })  
  });
  
</script>

Customer actions that will trigger a cart update event:

  • Add to cart
  • Increase cart item quantity
  • Decrease cart item quantity
  • Remove cart item
  • Empty cart
  • Apply discount code
  • Add cart note

You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>

  /**
  * @param {Cart}   cart - Shopify cart
  * @param {string} type - update event type
  * @param {any}    rest - rest of the objects that are returned
  *
  * You can use the provided Shopyflow objects to implement custom logic.
  */
  
  window.addEventListener('ShopyflowReady', (event) => {
    Shopyflow.on('cartUpdate', ({ cart, type, ...rest }) => {
      console.log('Event type:', type);
      console.log('Cart:', cart);
      console.log('Rest of the event objects:', rest);   
      // Run your code here
    })  
  });
  
</script>

Read more →

Cart Load Event

Fires when cart is fetched from Shopify.
Attribute Name
cartLoad
Attribute Value
True or 1
Method
cartLoad

You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>

  /**
  * @param {Cart} cart - Shopify cart
  *
  * You can use the provided Shopyflow objects to implement custom logic.
  */
  
  window.addEventListener('ShopyflowReady', (event) => {
    Shopyflow.on('cartLoad', ({ cart }) => {
      console.log('Cart:', cart);
      // Run your code here
    })  
  });
  
</script>

You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>

  /**
  * @param {Cart} cart - Shopify cart
  *
  * You can use the provided Shopyflow objects to implement custom logic.
  */
  
  window.addEventListener('ShopyflowReady', (event) => {
    Shopyflow.on('cartLoad', ({ cart }) => {
      console.log('Cart:', cart);
      // Run your code here
    })  
  });
  
</script>

Read more →

Option Change Event

Fires when customer picks a product option.
Attribute Name
optionChange
Attribute Value
True or 1
Method
optionChange

You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>

  /**
  * @param {HTMLElement}         el - product container element
  * @param {ProductVariant} variant - the product variant that's selected
  *
  * You can use the provided Shopyflow objects to implement custom logic.
  */
  
  window.addEventListener('ShopyflowReady', (event) => {
    Shopyflow.on('optionChange', ({ el, variant }) => {
      console.log('Product container:', el);
      console.log('Variant:', variant);
      // Run your code here
    })  
  });
  
</script>

You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>

  /**
  * @param {HTMLElement}         el - product container element
  * @param {ProductVariant} variant - the product variant that's selected
  *
  * You can use the provided Shopyflow objects to implement custom logic.
  */
  
  window.addEventListener('ShopyflowReady', (event) => {
    Shopyflow.on('optionChange', ({ el, variant }) => {
      console.log('Product container:', el);
      console.log('Variant:', variant);
      // Run your code here
    })  
  });
  
</script>

Read more →

Quantity Change Event

Fires when quantity selector value changes.
Attribute Name
quantityChange
Attribute Value
True or 1
Method
quantityChange

You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>

  /**
  * @param {HTMLElement}  el - product container element
  * @param {Number} quantity - the current product quantity
  *
  * You can use the provided Shopyflow objects to implement custom logic.
  */
  
  window.addEventListener('ShopyflowReady', (event) => {
    Shopyflow.on('quantityChange', ({ el, quantity }) => {
      console.log('Product container:', el);
      console.log('Quantity:', quantity);
      // Run your code here
    })  
  });
  
</script>

You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>

  /**
  * @param {HTMLElement}  el - product container element
  * @param {Number} quantity - the current product quantity
  *
  * You can use the provided Shopyflow objects to implement custom logic.
  */
  
  window.addEventListener('ShopyflowReady', (event) => {
    Shopyflow.on('quantityChange', ({ el, quantity }) => {
      console.log('Product container:', el);
      console.log('Quantity:', quantity);
      // Run your code here
    })  
  });
  
</script>

Read more →

Gallery Image Change Event

Fires when main product image changes.
Attribute Name
galleryImageChange
Attribute Value
True or 1
Method
galleryImageChange

You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>

  /**
  * @param {HTMLElement} el - main image element element
  * @param {string}     src - image url
  *
  * You can use the provided Shopyflow objects to implement custom logic.
  */
  
  window.addEventListener('ShopyflowReady', (event) => {
    Shopyflow.on('galleryImageChange', ({ el, src }) => {
      console.log('Image element:', el);
      console.log('Image URL:', src);
      // Run your code here
    })  
  });
  
</script>

You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>

  /**
  * @param {HTMLElement} el - main image element element
  * @param {string}     src - image url
  *
  * You can use the provided Shopyflow objects to implement custom logic.
  */
  
  window.addEventListener('ShopyflowReady', (event) => {
    Shopyflow.on('galleryImageChange', ({ el, src }) => {
      console.log('Image element:', el);
      console.log('Image URL:', src);
      // Run your code here
    })  
  });
  
</script>

Read more →

Cart Open Event

Fires when cart is opened.
Attribute Name
cartOpen
Attribute Value
True or 1
Method
cartOpen

You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>

  /**
  * @param {HTMLElement} el - Cart element
  * @param {Cart}      cart - Shopify cart
  *
  * You can use the provided Shopyflow objects to implement custom logic.
  */
  
  window.addEventListener('ShopyflowReady', (event) => {
    Shopyflow.on('cartOpen', ({ el, cart }) => {
      console.log('Cart element:', el);
      console.log('Cart:', cart);
      // Run your code here
    })  
  });
  
</script>

You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>

  /**
  * @param {HTMLElement} el - Cart element
  * @param {Cart}      cart - Shopify cart
  *
  * You can use the provided Shopyflow objects to implement custom logic.
  */
  
  window.addEventListener('ShopyflowReady', (event) => {
    Shopyflow.on('cartOpen', ({ el, cart }) => {
      console.log('Cart element:', el);
      console.log('Cart:', cart);
      // Run your code here
    })  
  });
  
</script>

Read more →

Customer Login Event

Fires when customer logs in to your store.
Attribute Name
customerLogin
Attribute Value
True or 1
Method
customerLogin

You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>

  /**
  * @param {string}     id - customer ID
  * @param {string}  email - customer email
  * @param {string[]} tags - customer tags
  *
  * You can use the provided Shopyflow objects to implement custom logic.
  */
  
  window.addEventListener('ShopyflowReady', (event) => {
    Shopyflow.on('customerLogin', ({ id, email, tags }) => {
      console.log('Customer ID:', id);
      console.log('Customer email:', email);
      console.log('Customer tags:', tags);
      // Run your code here
    })  
  });
  
</script>

You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>

  /**
  * @param {string}     id - customer ID
  * @param {string}  email - customer email
  * @param {string[]} tags - customer tags
  *
  * You can use the provided Shopyflow objects to implement custom logic.
  */
  
  window.addEventListener('ShopyflowReady', (event) => {
    Shopyflow.on('customerLogin', ({ id, email, tags }) => {
      console.log('Customer ID:', id);
      console.log('Customer email:', email);
      console.log('Customer tags:', tags);
      // Run your code here
    })  
  });
  
</script>

Read more →

Method

contents

Shopyflow Ready Event

Utility
Fires when Shopyflow JS library first loads and right before it starts processing your store.
Attribute Name
ShopyflowReady
Attribute Value
True or 1
Nesting Rule
Can be placed anywhere in the site
Events
>
Shopyflow Ready Event

Rest of the Shopyflow event listeners must be placed inside the ShopyflowReady event listener.
You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>
  window.addEventListener('ShopyflowReady', (event) => {
    // Run your code here
  });
</script>

Read more →

Webflow app usage

Webflow app settings

Buy Module Ready Event

Utility
Fires when Shopyflow finishes processing a Buy Module.
Attribute Name
buyModuleReady
Attribute Value
True or 1
Nesting Rule
Can be placed anywhere in the site
Events
>
Buy Module Ready Event

All product containers will trigger this event once they are processed by Shopyflow.
You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>

  /**
  * @param {HTMLElement}  el - product container element
  * @param {Product} product - the product associated with the Buy Module
  *
  * You can use the provided Shopyflow objects to implement custom logic.
  */
  
  window.addEventListener('ShopyflowReady', (event) => {
    Shopyflow.on('buyModuleReady', ({ el, product }) => {
      console.log('Product container:', el);
      console.log('Product', product);    
      // Run your code here
    })  
  });
  
</script>

Read more →

Webflow app usage

Webflow app settings

Cart Update Event

Utility
Fires when cart is updated by a customer action.
Attribute Name
cartUpdate
Attribute Value
True or 1
Nesting Rule
Can be placed anywhere in the site
Events
>
Cart Update Event

Customer actions that will trigger a cart update event:

  • Add to cart
  • Increase cart item quantity
  • Decrease cart item quantity
  • Remove cart item
  • Empty cart
  • Apply discount code
  • Add cart note

You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>

  /**
  * @param {Cart}   cart - Shopify cart
  * @param {string} type - update event type
  * @param {any}    rest - rest of the objects that are returned
  *
  * You can use the provided Shopyflow objects to implement custom logic.
  */
  
  window.addEventListener('ShopyflowReady', (event) => {
    Shopyflow.on('cartUpdate', ({ cart, type, ...rest }) => {
      console.log('Event type:', type);
      console.log('Cart:', cart);
      console.log('Rest of the event objects:', rest);   
      // Run your code here
    })  
  });
  
</script>

Read more →

Webflow app usage

Webflow app settings

Cart Load Event

Utility
Fires when cart is fetched from Shopify.
Attribute Name
cartLoad
Attribute Value
True or 1
Nesting Rule
Can be placed anywhere in the site
Events
>
Cart Load Event

You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>

  /**
  * @param {Cart} cart - Shopify cart
  *
  * You can use the provided Shopyflow objects to implement custom logic.
  */
  
  window.addEventListener('ShopyflowReady', (event) => {
    Shopyflow.on('cartLoad', ({ cart }) => {
      console.log('Cart:', cart);
      // Run your code here
    })  
  });
  
</script>

Read more →

Webflow app usage

Webflow app settings

Option Change Event

Utility
Fires when customer picks a product option.
Attribute Name
optionChange
Attribute Value
True or 1
Nesting Rule
Can be placed anywhere in the site
Events
>
Option Change Event

You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>

  /**
  * @param {HTMLElement}         el - product container element
  * @param {ProductVariant} variant - the product variant that's selected
  *
  * You can use the provided Shopyflow objects to implement custom logic.
  */
  
  window.addEventListener('ShopyflowReady', (event) => {
    Shopyflow.on('optionChange', ({ el, variant }) => {
      console.log('Product container:', el);
      console.log('Variant:', variant);
      // Run your code here
    })  
  });
  
</script>

Read more →

Webflow app usage

Webflow app settings

Quantity Change Event

Utility
Fires when quantity selector value changes.
Attribute Name
quantityChange
Attribute Value
True or 1
Nesting Rule
Can be placed anywhere in the site
Events
>
Quantity Change Event

You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>

  /**
  * @param {HTMLElement}  el - product container element
  * @param {Number} quantity - the current product quantity
  *
  * You can use the provided Shopyflow objects to implement custom logic.
  */
  
  window.addEventListener('ShopyflowReady', (event) => {
    Shopyflow.on('quantityChange', ({ el, quantity }) => {
      console.log('Product container:', el);
      console.log('Quantity:', quantity);
      // Run your code here
    })  
  });
  
</script>

Read more →

Webflow app usage

Webflow app settings

Cart Open Event

Utility
Fires when cart is opened.
Attribute Name
cartOpen
Attribute Value
True or 1
Nesting Rule
Can be placed anywhere in the site
Events
>
Cart Open Event

You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>

  /**
  * @param {HTMLElement} el - Cart element
  * @param {Cart}      cart - Shopify cart
  *
  * You can use the provided Shopyflow objects to implement custom logic.
  */
  
  window.addEventListener('ShopyflowReady', (event) => {
    Shopyflow.on('cartOpen', ({ el, cart }) => {
      console.log('Cart element:', el);
      console.log('Cart:', cart);
      // Run your code here
    })  
  });
  
</script>

Read more →

Webflow app usage

Webflow app settings

Customer Login Event

Utility
Fires when customer logs in to your store.
Attribute Name
customerLogin
Attribute Value
True or 1
Nesting Rule
Can be placed anywhere in the site
Events
>
Customer Login Event

You can add this code to the page settings inside the <head> tag to listen to this event and to execute your custom code as follows:

<script>

  /**
  * @param {string}     id - customer ID
  * @param {string}  email - customer email
  * @param {string[]} tags - customer tags
  *
  * You can use the provided Shopyflow objects to implement custom logic.
  */
  
  window.addEventListener('ShopyflowReady', (event) => {
    Shopyflow.on('customerLogin', ({ id, email, tags }) => {
      console.log('Customer ID:', id);
      console.log('Customer email:', email);
      console.log('Customer tags:', tags);
      // Run your code here
    })  
  });
  
</script>

Read more →

Webflow app usage

Webflow app settings

State management

No items found.

Related Utilities

No items found.
Can't find a solution? Join our Discord server to get an instant reply from our experts and the community.