In my previous article I discussed the configuration of the first three options in the section of Usage Restriction for coupons in WooCommerce, i.e. "Minimum spend", "Individual use only" and "Exclude sale items". These options allow online store owners to include some additional functionalities and checks in the coupons. However, this section includes several other settings, which are "Products" and "Exclude Products". Let's discuss these options today.
Usage Restriction
Before starting off with the topic formally, allow me a brief recap of where we are. Go to your website's WordPress admin dashboard and then WooCommerce > Coupons > Add Coupon > Coupon Data > Usage Restriction. Now let's start with the configurations ahead.
Products
Products is the option from where I will start today's topic. You can find this option beneath the checkbox of Exclude sale items. The option for Products will work only if you list a number of products which should be in the customer's cart for a coupon to be valid. Simply add the names of the products in the field provided. Let me explain how this setting works with the help of an example.
Consider a coupon with the following settings:
- Coupon code: free
- Discount type: Cart Discount
- Coupon amount: 50
- Minimum spend: 50
- Products: Woo Ninja, Woo Logo, Woo Album #1
The above mentioned data shows that if the customer's cart contains any of these three products (i.e. Woo Ninja, Woo Logo, Woo Album #1) then this coupon can be used.
Case 1: Cart Contains Product Items
In the first case, the customer's cart contains three different items (i.e. Woo Ninja, Patient Ninja, Woo Album #2) out of which one item (i.e. Woo Ninja) has been defined by the store owner in the Products field of the coupon. It means that the customer can successfully use this coupon and enjoy a discount of £50 on the entire cart.
The cart totals also show that after using this coupon the original price of the order, i.e. £79, is reduced to £29.
Case 2: Cart Does Not Contain Product Items
Now the customer's cart contains two different items (i.e. Patient Ninja, Woo Album #2) and no such item has been defined by the store owner in the Products field. Hence, when the customer tries to apply a coupon on the order, a notification will display on the screen with a message saying "Sorry, this coupon is not applicable to your cart contents".
The cart totals also show that the customer must pay the full amount in this case.
Exclude products
The option for Exclude products will function in the opposite manner to Products which we've just discussed. In this field you can specify the names of all those products on which the coupon will not apply, and if any of these products are in the cart then a customer will not be able to use this coupon. I am again going to explain the working of this coupon, which has the following configurations:
- Coupon code: free
- Discount type: Cart Discount
- Coupon amount: 50
- Minimum spend: 50
- Exclude products: Woo Logo, Woo Album #2, Woo Single #2
If the customer's cart contains any of these three products (i.e. Woo Logo, Woo Album #2 and Woo Single #2) then this coupon cannot be used.
Case 1: Cart Contains Exclude Products Items
The figure displayed above shows a cart where a customer has placed three different items, i.e. Woo Album #2, Happy Ninja and Woo Ninja. However, the online store owner has added Woo Album #2 in the Exclude products field. So when the customer tries to use the coupon on this cart, a notification of an unsuccessful attempt will be displayed.
And similarly, the cart totals also represent a full price of £59 which is to be paid by the customer.
Case 2: Cart Does Not Contain Exclude Products Items
In the next scenario, the cart again contains three different items (i.e. Happy Ninja, Woo Ninja, Woo Single #1), but this time no item from the Exclude products field is included. So the coupon will be applied successfully, as can be seen below.
The cart totals shows that now a customer enjoys a discount on the total price of £53, which reduces to £3.
I hope to have explained these two properties clearly, with two different examples each. I will be completing the section of Usage Restriction settings in my next article. I hope that up till now I have made things quite clear. Still if you have any queries you may ask in the comment box below.
Comments