Coupon restricted by tag group

User story
As an admin
I want to assign a coupon to a specific tag group (e.g “Collector’s items”, Runway, etc.)
So that only products with that tag group can apply the discount

Given the admin is on the coupon settings page (WordPress admin panel => marketing => coupons => add new/ or edit existing coupon)
Then the admin can see there is an option to set the coupon to apply to one or multiple tag groups (similar to as the current function where the coupon can be applied to certain categories)

Given the admin is on the coupon settings page
When the admin selects to restrict the coupon to one or multiple tag group from the tag group dropdown
And saves the coupon
Then the coupon is only applied to the selected tag group(s)

Scenario: Coupon does not apply to products outside the assigned tag group
Given a user only has only one product in cart and this product does not belong to the coupon’s tag group
When the user enters the coupon code
Then the system should show an error message indicating the coupon is not valid for this product

Scenario: Mixed cart with items inside and outside the coupon’s tag group
Given a user has added a product belonging to the coupon’s tag group to the cart
And the user has added a product that does not belong to the coupon’s tag group to the cart
And a valid coupon is assigned to that tag group
When the user enters the coupon code at checkout
Then the discount is applied only to the product within the assigned tag group
And the product outside the tag group receives no discount
And the order total reflects the partial discount correctly

Comments

Leave a Reply