DEV Community

loading...
Cover image for How You Can Create Discount Coupons Codes in WooCommerce

How You Can Create Discount Coupons Codes in WooCommerce

Asghar Paracha
I am an Enthusiastic Website Developer
・3 min read

We all know the significance of working with discount coupons in a managed way to facilitate sales in our e-commerce. And while it is a sales strategy that has long been used in offline commerce, primarily in supermarkets, its use has become very popular in electronic commerce in recent years, especially because of the great advantage it has when it comes to segmenting the deal and applying it only to the customers you are interested in.

Tutorial on how you can build and create a WooCommerce discount coupon, step by step.

The choice of making discount coupons is included in the installation of WooCommerce and requires no additional plugin.

If it is true that there are plugins that allow advanced coupon management and that allow you to uninstall the coupon automatically when the maximum balance is reached, gift coupons or add coupons via url, among other items. I'm just going to concentrate on explaining how to build and customize them according to your needs in this post, though.

Since there are several different coupon configurations, it is difficult to describe in depth how to build a particular coupon for each situation, depending on the type of discount you choose to add -percentages or fixed amounts-, restrictions, product filters or whether or not taxes are included. Let's take an example of Foot Locker promo code 20 off the whole order page here, they have implemented coupons via plugin, but today I'm going to show you a comprehensive tutorial without using any plugin to include coupons in WooCommerce.

Instead, I chose a percentage-based discount coupon for a certain type of product and a minimum order expenditure as an example.

I think it's a pretty complete instance and that it will serve you primarily to understand how in the future you can customize yours. The steps to take are, therefore:

(1) Click on 'WooCommerce> Coupons' and then on 'Add Coupon' to access the coupons section.

(2) We're adding a special coupon code and a definition. It is not a necessary rule, but it is advisable to use more or less descriptive codes, even if you use the description field to display the discount applied by that coupon in more detail.

(3) The fields of the "Common" tab are configured. I'm just describing the fields we're going to define, the rest of which are left at their default value.

Discount rate . The "percent discount on the product" option is chosen. With this choice, instead of the total of the cart, you just apply a discount to the product or items of a certain category.

Coupon amount . In this case, we introduce the discount percentage, since it's 20 percent, you have to enter the figure 20. In your case, you can research the profit margin the product has and measure the discount on the basis of that.

Coupon expiration date . Here, to restrict its usage in time, we enter the expiration date of the coupon. In order to create urgency in the consumer and to motivate them to use it before it expires and loses the discount, it is advisable to always identify a coupon deadline.

(4) We configure the 'Restriction of Use' tab fields.
Minimum budget . We specify the minimum cost that the customer must make to apply the discount, in this example I will define a minimum cost of $ 80. You must bear in mind that it applies to the order subtotal, i.e. taxes are not taken into consideration.

Single use only . In conjunction with other coupons, we check this option to disable the accumulation of discounts.

Exclude products for sale . To avoid losing the profit margin on the sale, it is recommended that you check this option if you already have other product offers published in WooCommerce.

Categories of Items . In this example, I will apply it to the category 'Running Shoes' by selecting the product category for which we want to allow the discount. You must use the 'Products' field if you just want to apply the discount to those products.

(5) By entering the value 1 in the 'Usage limit per user' field in the 'Use limit per user' tab, we limit the use of the coupon to one time per client.

(6) Eventually, we click on 'Publish' and trigger our WooCommerce discount coupon .

Discussion (2)

Forem Open with the Forem app