Free products

Introduction

In order to set up free products that are dependant on another product type being present in the cart, we will make use of Strata's metafields.

Requirements

First step is to make sure the required metafield definition has been created. Go to "Metafields" -> "Products" and look for a definition called "Cart must contain product type". If it does not exist, then it needs to be created first.

Adding constraints

Any product can in theory be our "free" product. In this example we have a product called "2x Eco-Rest Pillows" which is priced a $0. This product should only be allow in the cart if the customer also have a product of the type of "Mattress" in their cart. To accomplish this we go to the "2x Eco-Rest Pillows" product and select "Mattress" as the "Cart must contain product type" option in the metafields section. Now if the customer removes the last mattress product from the cart, the "2x Eco-Rest Pillows" will also be removed, if present, from their cart.

Was this helpful?