The Salsa storefront page accepts payment for merchandise (and other stuff) sold on your storefront. There's a way to add an additional amount to the storefront (click here), but not a way to offer a discount. This article describes a solution that offers a discount on the storefront checkout if a purchaser has the right discount code.
Before you begin
You'll need to gather this information before you begin:
storefront_KEYfor the storefront where you'll be offering a discount.
- The template that will be modified. It's usually a pretty good idea to create a copy of one of your templates for modifications like this. Click here to find out how to make a copy.
- The discount code that the purchaser must type in order to get the discount. The default value is
- The discount rate that the purchaser must type. The default value is
When the button is clicked, then the script verifies that the correct discount code has been entered. If an incorrect code is entered, then the script does not apply a discount.
If the correct discount code is supplied, then configured discount rate against the merchandise price. The resulting discount is then displayed as a negative number. The final amount is computed as follows:
merchadise total - discount + shipping ---------------- total
The standard donation processing occurs after the total is computed.
Here are some steps that you can use to install this solution:
- Edit the template used by the storefront.
- Locate the
</body>tag using the browser's search tool.
- Insert a blank line just before the
- Click here to view the solution source.
- Click on the
Rawbutton. You'll see window open that contains the solution source. (There's a lot of it...)
- Copy the contents of the window and close it.
- Paste the copied text into the newly inserted line in the template.
- Configure the solution by modifying the discount code and discount rate in the pasted text. You'll find it right at the top. Please use the guidance in the text to configure the script.
- Save the template.
If you have any questions, please collect this information:
chapter_KEYif you are in a chapter
template_KEYof the modified template
storefront_KEYof a storefront that uses the modified template
- A screenshot if at all possible
Send this information to email@example.com, and we'll be glad to help.