> For the complete documentation index, see [llms.txt](https://docs.yaycommerce.com/yaypricing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yaycommerce.com/yaypricing/use-cases/category-discount.md).

# Category discount

When it comes to category discounts, we may have these scenarios:

* If a customer adds $100 worth of **Accessories** category, their **whole cart** gets 5% off.
* If a customer adds $100 worth of **Accessories** category, their **subtotal cart value** of those products gets 5% off.
* If a customer adds $100 worth of **Accessories** category, they get a **free item** or another discounted product.

### Min spend on categories gets free item

Here's how to set up this promotion: **Spend $100, get 1 gift,** i.e. "If the customer spends a certain amount on specific categories, they automatically get a free item".

#### Step 1: Specify categories and gift item

Let's get started to offer a free t-shirt if an order contains products from the categories A, B, C, or D.

* Buy products: customers should buy products from these categories A, B, C, D.
* Get products: customers get a giveaway as a t-shirt.

<figure><img src="/files/yW6SCPfZxtvtKQQDEkRX" alt="Category products and giveaway product"><figcaption></figcaption></figure>

#### Step 2: Set the required minimum spend&#x20;

Go to **Conditions** tab and add your requirement. E.g. the monetary amount of those cart items from the categories A, B, C, or D is greater than or equal to $100.

<figure><img src="/files/6vyREdaE3e4LksRJjq1D" alt="Minimum spend on these categories gets free item"><figcaption></figcaption></figure>

#### Step 3: Set up other additional settings and save changes.

On cart page, when the cart subtotal of those items from A, B, C, or D categories reaches $100, the t-shirt will be automatically added for free.

<figure><img src="/files/KhaOHzVJAvIoL8uAIhcf" alt="WooCommerce dynamic discount on cart page"><figcaption></figcaption></figure>
