We want to automagically add a free product to the customers cart when they purchase a certain product(s).
Note: This code will likely need to be adapted to suit your theme, however it should be enough to discribe the concept.
Add the free product
- Define the free product and which products can add it.
We create some theme setting that allow us to pick the free product and a collection of products that can add it.