Example - Applying a coupon code to receive a discount on selected products
This example demonstrates how to create and apply a product coupon that grants a discount on selected products. The discount applies to all coffee products and grants 10 % off the price of each product.
The example uses the Dancing Goat sample site.
Adding a product coupon
First, you need to add a new product coupon.
Open the Product coupons application.
Click Enter product coupon.
- The system opens a page where you can specify the coupon properties.
Enter the following values for the coupon’s properties:
- Name: Coffee discount coupon
- Enabled: Yes (selected)
- Applies to: products in departments
- Departments: click Select departments and choose Coffees
- Discount: percentage
- Amount: 10
Click Save.
The system creates a new product coupon and redirects you to the Coupons tab. Here you need to generate or manually create coupon codes.
- Click Create coupon code.
- Type COF-10 into the Coupon code field.
- Click Save.
The product coupon is now ready for use. If your customers add any products from the Coffees department to their shopping carts and apply the COF-10 coupon code, they receive a 10% discount on each of the products.
Applying the coupon code
While shopping on the live site
View the live site.
Select Store -> Coffee in the store’s main menu.
Click a certain type of coffee to view its details, enter a quantity and click ADD TO CART. You can repeat the process for multiple types of coffee.
- The system displays the content of your shopping cart, allowing you to enter a coupon code.
Type the COF-10 coupon code into the Discount coupon field and click APPLY.
The system applies the discount on the product and recalculates the order. The sample site displays the product coupon’s 10% discount separately for each item in the shopping cart. If you now click CHECKOUT, you can continue in the checkout process.
While editing an existing order in the administration interface
Open the Orders application.
Edit () the selected order.
- Make sure you select an order containing at least one product from the Coffees department.
Switch to the Items tab.
Enter the coupon code:
- If you have a coupon, please enter it here: COF-10
Click Update.
Click OK to save the application of the product coupon into the order.
The system applies the product coupon’s 10% discount. You can see the sums of the discount values in the Discount column of each order item, and when viewing the price details ().