Discount codes are a great way to promote special offers and discounts on your Weebly site. You can add a discount code to your Weebly site in two ways:
- Add a Discount Code Widget to your Weebly site.
- Use HTML to add a discount code to your Weebly site.
Adding a Discount Code Widget to Your Weebly Site
Weebly’s Discount Code widget makes it easy to add a discount code to your site. Simply drag and drop the widget into place, enter your code, and choose whether or not you want the code to expire. You can also specify the number of uses for the code and choose which products the code applies to.
To add a Discount Code widget to your Weebly site:
1. Log in to your Weebly account and open your site in the Editor.
2. Click the Add button (+) and then select More..
3. Select the Widgets tab and then scroll down to find the Discount Code widget under Promotions.
4. Drag and drop the widget into place on your page.
5. In the Configure window, enter your discount code and choose when you want the code to expire, how many times it can be used, and which products the code applies to (optional).
6. Click Save & Close when you’re done configuring the widget.
7. Publish your site to make the discount code live on your site.
Adding a Discount Code Using HTML
If you’re comfortable working with HTML, you can also add a discount code to your Weebly site by embedding HTML code on your page. To do this:
1. Click anywhere on your page where you want to add the discount code
2. Click the HTML button in the toolbar (it looks like <>).
3. If there’s already content in the HTML window, scroll down until you see the end of the existing content before adding your own HTML code.
4. Paste this HTML code into the window:
<script
type="text/javascript">
function getDiscountCode() {
var currentURL = window.location;
var currentHost = currentURL .host;
var currentPath = currentURL .pathname;
var WeeblyDiscountCodePath = "/discount-code/";
var WeeblyDiscountCodeFullPath = currentHost + WeeblyDiscountCodePath;
if (currentPath == WeeblyDiscountCodeFullPath) {
alert("Your discount code is: Weebly10");
}
}
getDiscountCode();
</script>
5. Click Save when you’re done adding HTML code to your page.
6. Publish
7. Go to http://yoursiteaddress/discount-code/
8. When you go to this URL, you should see an alert box with your discount code.