Ecommerce Templates > General Help > Donations

Donations

The donations feature introduced in version 5.6.0 allows customers to introduce an amount of their choice and then go through checkout to send the funds on to the store owner. This is typically used if you want accept donations on the store or if you need customers to pay for a service.

Setting up the donations page

ASP Version: Save products.asp as donations.asp and then in code view find the line

<!--#include file="vsadmin/inc/incproducts.asp"-->

and change it to

<% explicitid="donation" %>
<!--#include file="vsadmin/inc/incspecials.asp"-->

Upload to your server and make sure it is working as it should.

If you don't want to set up your own donations page then you can just add a link in your menu to proddetail.asp?prod=donation and that will show the donations page.

PHP Version: Save products.php as donations.php and then in code view find the line

<?php include "vsadmin/inc/incproducts.php"?>

and change it to

<?php
$explicitid="donation";
?>
<?php include "vsadmin/inc/incspecials.php" ?>

Upload to your server and make sure it is working as it should.

If you don't want to set up your own donation page then you can just add a link in your menu to proddetail.php?prod=donation and that will show the donations page.

Donations

How it works

Once the customer has filled out the form shown above they will be taken to checkout as they would with a regular product. After checking out the customer and the store owner will receive confirmation emails and the payment will be posted to the admin orders page.

Donations

Using the donations page as a general payment method

It may be that you need to use the donations feature for other purposes such as receiving payments for extra shipping, add-ons, custom services etc. If that is the case you probably won't want the word "donations" to appear anywhere in the order process. Setting up the donations to receive general payments is quite simple.

Open vsadmin/inc/languagefile_en.asp or .php and change the following two entries

xxDonat="Direct Payment"
xxMakDon="Make A Direct Payment"

$xxDonat="Direct Payment";
$xxMakDon= "Make A Direct Payment";

It's a good idea to copy those entries to vsadmin/includes.asp or includes.php do they don't get overwritten by updaters.

Now open donations.asp and add the following

<%
prodid="payments"
%>

before

<!--#include file="vsadmin/inc/incspecials.asp"-->

For the PHP version, that would be

<?php
$prodid="payments";
?>

before

<?php include "vsadmin/inc/incspecials.php" ?>

Finally in vsadmin/includes.asp add

donationid="payments"

or for vsadmin/includes.php

$donationid="payments";

Once you have set up the donations page as set out above, you should have a donations page looking like this

Direct payment

... and when added to cart you will see a summary of the payment

Payment details

Adding tax and / or handling to donations

By default donations do not get charged taxes, handling, etc. But, if you want to "fine tune" the setup for these products as for other products then just create a product in the admin products page with the product id "donation". Then you can change the settings for these products as for any other product and it will be liable for tax unless you set it to tax exempt in the exemptions. You will probably want to make it exempt from shipping and handling in the exemptions section.