1. Documentation /
  2. Introduction to WooCommerce Bookings /
  3. WooCommerce Bookings: Use Cases /
  4. Bookings Use Case: Book Yoga Classes after pre-purchase of 10 sessions (Using Smart Coupons and Min/Max Quantities)

Bookings Use Case: Book Yoga Classes after pre-purchase of 10 sessions (Using Smart Coupons and Min/Max Quantities)

This bookings use case will walk through how to use WooCommerce and WooCommerce Bookings to allow customers to pre-purchase a block of classes, and then apply that credit to future bookings.

The feature to apply pre-purchased credit to future bookings, as well as limit the number of bookings that can be made, relies on two additional plugins: Smart Coupons and Min/Max Quantities.

Scenario

↑ Revenir en haut

You have a yoga studio and would like to offer the option to pre-purchase 10 sessions at a 10% discount.

The customer first purchases a 10-pack of coupons. They can then use the purchased coupons to book up to 10 yoga sessions at a day and time of their choosing.

Products Used

↑ Revenir en haut

For this scenario, you will need to first purchase and install all four of the following plugins:

Setup and Configuration

↑ Revenir en haut

Create the Yoga Class Bookable Products

↑ Revenir en haut

If you do not already have bookable products set up for your Yoga Classes, go ahead and create them. The classes can be set up for any day or time, with any prices.

More information on how to create the basic Class Products is found under Creating a Bookable Product.

For example, you could create a Yoga Class that runs several times a week for an hour at a time, at a cost of $20 per class.

Bookings Use Case - Yoga Class - Class Bookable Product

Create the Coupon

↑ Revenir en haut

The 10-pack of classes will take the form of 10 coupon codes, each of which can be applied to the Yoga Class bookable product, one time each for each code. The customer will purchase the pack of coupon codes, then apply those codes to the actual Yoga Class product when they want to redeem a class.

These coupon codes are generated using the basic WooCommerce Coupons functionality plus added options created with the Smart Coupons plugin.

To create the coupon template:

  1. Go to your website’s dashboard.
  2. Click on Marketing > Coupons on your dashboard menu and click the “Add Coupon” button at the top of the screen.
  3. Assign a coupon code to the coupon in the top box, for example, “yogaclass-fulldiscount.”
  4. On the General tab, set the Discount Type to “Percentage discount” and the Coupon Amount to 100, for a 100% discount. This means the coupon will allow them to book a class for free, as they already paid for the class when purchasing the coupon set.
  5. Check off the Smart Coupon option Auto Generate New Coupons With Each Item. This will reveal a few new options.
  6. Set the coupon to be Valid For 1 Year (if applicable, or adjust the timing here for your needs).
  7. Use the Coupon Code Format box to set a prefix for the 10 custom coupon codes that are generated for the customer.
Bookings Use Case - Yoga Class - Coupon General Settings
  1. On Usage restrictions tab, set the product that the coupon can be used for, e.g., the Yoga Class Bookable Product.
Bookings Use Case - Yoga Class - Coupon Usage Restrictions
  1. On the Usage limits tab, set the usage limit per coupon to 1, so that each coupon can only be used once:
Bookings Use Case - Yoga Class - Coupon Usage Limits Settings
  1. Publish the coupon using the blue Publish button in the top right.

Create the Coupon Product

↑ Revenir en haut

Now we want to allow customers to buy a 10-pack of coupon codes, at a discount. This will be a Simple Product as it is just a set of coupons that will be added in their account; it does not represent a specific booking of a class until the coupon codes are applied to a specific day and time on the Yoga Class bookable product.

  1. Go to your website’s dashboard.
  2. Click Products > Add New on your dashboard to create a new product. Set it to be a Simple Product in the Product Data box.
  3. Mark the product as Virtual as there is no physical component to the coupons.
  4. Set the price for the product. Note that this price is the price for a single coupon; we will use the quantity field below to force the customer to buy 10 at a time. You could use a Regular Price that is the price of the Yoga Classes, and a Sale Price that showcases the discount they are getting by buying the 10-pack.
  5. In the Coupons box, select the coupon you created above (in our example, this is named “yogaclass-fulldiscount”). This box only appears if you have Smart Coupons installed and active.
  6. In the Group of… box, enter 10, which will require customers to purchase this coupon as a group of 10 only. This box only appears if you have Min/Max Quantities installed and active.
Bookings Use Case - Yoga Class - Simple Product for the Coupon 10 pack purchase
  1. Publish the 10-pack Coupon Simple Product with the blue Publish button in the top right.

Customer Experience

↑ Revenir en haut

Purchasing coupons

↑ Revenir en haut

Customers will start out by purchasing the pack of 10 yoga classes, which is a simple product. This shows the price per class and that they’ll be purchasing 10 classes. The customer will click “Add to cart” to add a single 10-pack of coupons to their cart.

Bookings Use Case - Yoga Class - Coupon Code Product

This displays as 10 classes in the cart:

Bookings Use Case - Yoga Class - Coupon product in cart

Once the customer has completed the checkout process, the coupons are available via My Account under Orders, as well as display in the cart and checkout for relevant products.

Bookings Use Case - Yoga Class - Order with Coupons

Purchasing a class using a coupon

↑ Revenir en haut

Customers go to the Yoga Class bookable product in your shop, and select a specific day and time using the calendar. They then add that specific class to their cart using the Book Now button, seeing the normal cost.

In the cart, customers can enter one of their coupon codes in the Coupon Code box and click Apply coupon to apply the coupon. This reduces the cost of the class to $0.

Bookings Use Case - Yoga Class - Coupon Applied

The customer proceeds through the usual checkout flow to confirm the booking, but won’t need to pay anything for the class.

If they check their My Accounts page, they’ll see that the number of available coupons is reduced by one.

Refund or cancellation returns the coupon

↑ Revenir en haut

If the booking is cancelled or refunded, the coupon is returned to the customer so they can use it again.

Questions and Feedback

↑ Revenir en haut

Have a question before you buy? Please fill out this pre-sales form.

Already purchased and need some assistance? Get in touch with a Happiness Engineer via the Help Desk.