how to add a donate button to shopping cart

by Soledad Cronin DVM 7 min read

Add Donation Button to Shopping Cart Print

  • Create the Product. Begin SKU with “plg-donate”. ...
  • Get the Handle. Next, you will need to get the handle of the product. You can find the handle by viewing the product...
  • Embed the Item. Then you will need to edit the code for your theme. First, you will need to put the following script...

Full Answer

1. Create a product for your donation

The first thing you need to do is create a product that will be your donation. This product will be a single-option, with a single variant worth $0.01.

2. Add the donation product to a link list

Create a link list called “Donation”. Add a product link, select “Product” under Links To, and then select the “Donation” product. It should look like this:

3. Add a donation field to your cart page

This step is pretty theme-dependent. If you need a hand with placing and styling the textbox, please check with the designer of your theme or ask in the design forums.

4. Add the donation script to theme.liquid

Inside your Template Editor, create a new snippet called “donation-snippet”. Add the contents of this gist inside it.

image