Add To Cart button

Topics in this article


Add To Cart button in normal Pages

Add To Cart button in CMS Pages



Add To Cart button in normal pages 

  1. Create a Div Block.
  2. Place a Text Block and other elements you wish to have in the Div Block and style it.
  3. Add a custom attribute to the Div Block with the following values:
    • Name: Product
    • Value: The Product ID  (Product ID of the Shopify Item - How to get the Product ID)




Add a Div Block (Do not use Link Blocks for normal pages)




Add Attribute  (Name: Shopify, Value: Buy



Add To Cart button in CMS pages

Follow these steps

  1. Create a CMS collection in Webflow, or use a collection you already have.
  2. Create a Link field in your CMS collection (You can more fields to your collection as well, but create this field only for the Shopify product ID's).

    • de14.jpg

    • You do not have to give a specific name to the Link field, just name it something that you remember, so you can use in the design e.x.Shopify Product ID

  3. Create a collection item for each Shopify product that you want to add to your site.
    • Now that we have a Collection with a field for Shopify product ID's, you can create a new item for each new product you add to your Shopify backend and add it's Product ID to the product ID field. 
  4. Add a Link Block in your collection Template-page, or in the Collection Items.
    • Template Page is the page that is automatically created by adding a collection, in which you can have a unified design for all your items.
    • Collection Item is the item in a Collection List when you add a Collection list to a page.
  5. Select the Link block, then open the Element Settings (D) panel.
  6. Under the Link Settings, select the checkbox for Get URL from, and select the Shopify product ID
    • de15.jpg





To get a Product ID in Shopify: 

1. Login to your Shopify account
2. Go to the Products panel
3. Click on the product you want to have its ID and the product's page opens. 
4. Copy the Product ID from the address bar. The ID is the last part of the URL.



Have more questions? Submit a request