Step 1 – Copy the Snippet code below.

<!--  Spice Product Addons Snippet(cart page) Starts -->
<div id="spiceaddonsappid">
{% assign pcollections = '' | split: '' %}{% for item in cart.items %}{% assign product_collections = item.product.collections | map: "id" %}{% if product_collections %}{% assign pcollections= pcollections | concat: product_collections%}{% endif%}{% endfor %}<input type="hidden" id="sgcollectionscart" value="{{ pcollections | uniq | join: "," }}"/>
</div>
<!--  Spice Product Addons Snippet(cart page) ends -->

Step 2 – Go to  Online Store under the Shopify admin.

Step 3  – Select Actions (Current theme) and click  “Edit code”.

Step 4 – Find the file cart.liquid in the templates folder.

Step 5 – Find the <form> and </form> tags in the cart.liquid file and paste the snippet above </form> tag.

*For free installation assistance contact us on our email help@spicegems.com