Nov 22nd, 2016
View this in action Here
Step 1. Ensure that the right product is setup to have the free product added with it. Find the product form and modify the add to cart button to include this 'if statement' identifying the correct product handle.
Step 3. Make sure your cart is going to refresh properly if the paid product is removed. This will need to be done per theme, but ensure that you add the line 12 in this gist, and that it will loop to tell the cart not to display the product in the cart if it is the only item there:
Step 4. Now all we have to do is add the Shopify script to give a discount on this free product that was added, and here is the script to do so: