====== Adding a donation option on the Checkout ====== The following snippet adds a text input to the checkout to allow customers to add a donation to the cart when completing the checkout. ==== Add javascript ==== On the configuration page of your store's FoxyCart administration, under "Cart" look for "Add custom header or footer code to your website", and add this code into the "Footer" text area. {% if context == "checkout" %} {% endif %} You'll just need to modify the ''MODIFY THE PRODUCT LINK BELOW'' section to set the donation "product" as desired, the donation amount will come from the input you'll add in the next step. If your store is using [[https://wiki.foxycart.com/v/2.0/hmac_validation|link/form signing]], you'll just need to create that link and sign it (using the tool in the "sample code" section of the admin, if you don't have another way) and paste it in there as needed - ensuring the price field is encrypted as an open field. Make sure it's set to the appropriate category so it has the proper shipping and taxes applied to it. ==== Add HTML ==== Next, and still on the configuration page, under "Checkout" look for "Add custom form fields to your checkout", enable it and paste the following into the text box within: