Skip to content

Instantly share code, notes, and snippets.

{% comment %}
To add a companion product to the cart automatically if a primary product is in cart:
1. Create a new link list under your Navigation tab.
2. In that link list, make the first link point to companion product.
3. Copy your link list handle where indicated at line 9
4. Set the minimum cart total required for the bonus product on line 10
{% endcomment %}
{% assign linklist = linklists['put-your-link-list-handle-here'] %}
{% assign min_total = 100 %}
{% assign linklist = linklists['order-form'] %}
<form>
<table cellspacing="0" cellpadding="0" border="1">
<tbody>
<tr id="cart-headlines">
<td class="cart-thumb">&nbsp;</td>
<td class="cart-title">Product Title</td>
<td class="cart-unitprice">Price</td>
<td class="cart-quantity">Quantity</td>
</tr>