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

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: "," }}"/>
<!--  Spice Product Addons Snippet(cart page) ends -->

Step 2:- Go to the Online store -> Themes under the Shopify Admin.

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

Step 4:- Find Cart.json under the Templates folder.

*Note:– In the Shopify Online Store 2.0, each page type is represented as a .json file within the Templates folder of the theme, they are just simply data files that indicate which sections will appear by default on a page, and in what order.

 In our theme, we can see that cart.json file have a “cart-items” property, which is the section for that page, and the “type” property is used to identify the name of the included file.

Step 5:- Search for the cart-items section file name (main-cart-items) in the Sections folderIn our theme, the file name is “main-cart-items.liquid“. It may vary depending upon the theme.

Step 6:- Find the  <form> tag and the </form> tag in the file. Paste the snippet above  </form> and save the changes.

*If you can’t find the right place to install the snippet in your theme, please feel free to contact us on our email help@spicegems.com for free installation support.