<div class="w3-donation-tracker"></div>
TLDR: Place this snippet just above the checkout button in your cart.liquid file.
Overview
This tutorial will cover how to add the Share the Love donation selector to the cart page on your shop. If you have an AJAX cart, or any other type of popup, drawer, or pullout cart, there may be further steps necessary in order to get the app to work with this type of cart. If you would like for our app to show within one of these types of carts, or if you need help with the following tutorial, please feel free to reach out to us Here.
Installation
Step 1: Locate/Open your theme code files
- In your Shopify Admin, select Online Store from the vertical navigation menu on the left.
- For your main theme (the theme at the top of the list), click the "Actions" button in the top right, and then click Edit Code.
- On the left under Templates, navigate to cart.liquid.
Sometimes within your cart.liquid, it may tell you that the contents of your cart are within another file.
If this is the case, simply follow the path that it tells you to follow. In the example above, it is telling me to look in the "cart-template.liquid" file under the "Sections" folder. In this case, the cart template can be found here:
Step 2: Paste The Div
- This is the snippet we will be adding:
<div class="w3-donation-tracker"></div>
We typically place the snippet just before the "Checkout" button.
Hold "Ctrl" and press "F" to find text in this section, and search for the word "submit".
Find the submit button that is closest to the bottom of the file.
Place the snippet before the wrapper divs that surround the Checkout Button.
Here is what our cart looks like:
Step 3: Save!
Once you have pasted the div, be sure to save! Now you're ready to begin donating on behalf of your customers to their selected charity!
Click the link below for a visual tutorial: