Discount In Stock Products Only

Discount Only In-Stock Quantities of Products

The Stock Qty Greater condition allows you to limit discounts to quantities currently available in stock. This is useful for stores that allow backorders but only want to offer discounts on products that are currently available.

For example, if a customer adds 5 units of a product to their cart but only 3 units are in stock, the discount will apply to 3 units. The remaining 2 units will not receive the discount.

Supported Product Types: This condition supports Simple, Configurable, and Virtual products. Grouped and Bundled products are not supported.

Configure the Discount Rule

  1. Navigate to Promotions > Discount Rules in your Zoey Admin.
  2. Create a new Discount Rule or edit an existing one.
  3. Open the Actions tab.
  4. Under Apply, select the discount type you want to use, such as Percent of Whole Cart. When you combine Percent of Whole Cart with the stock condition below, the percentage applies only to the in-stock quantity of each eligible product—not to every unit in the cart.
  5. Enter your Discount Amount. For example, enter 25 for a 25% discount.
  6. Under Apply the rule only to cart items matching the following conditions (leave blank for all items), click the green + icon.
  7. Select Stock Qty Greater and set the condition to greater than 0.
  8. Save the Discount Rule.

With this condition configured, calculate the discounted amount for each eligible product using the lesser of its cart quantity and stock quantity, multiplied by its unit price and the discount percentage. Add those amounts to get the total discount. Units beyond available stock remain in the cart but receive no discount, even when Apply is set to Percent of Whole Cart.

Example: Discounting Available Stock

Consider a 25% discount configured with Percent of Whole Cart and Stock Qty Greater Than 0.

Value
Product Price$100
Quantity in Cart5
Quantity in Stock3
Quantity Discounted3
Discount Percentage25%
Total Discount$75

Although the customer has 5 units in their cart, only 3 units are available in stock. With Percent of Whole Cart, the discount is 3 × $100 × 25% = $75, not 5 × $100 × 25% = $125. The 2 additional units receive no discount.

Example: Multiple Products with Different Stock Quantities

When multiple products are added to the cart, the discount is calculated based on the eligible in-stock quantity of each product.

For example, with a 25% discount:

ProductUnit PriceCart QtyStock QtyDiscounted QtyDiscount
Product A$100533$75
Product B$50444$50
Product C$20200$0
Total$125

The discount applies to all 4 units of Product B, 3 units of Product A, and none of Product C because it is out of stock.

Important Notes

  • Partial stock quantities: When the cart quantity exceeds available stock, only the in-stock quantity receives the discount.
  • Multiple products: Each product's eligible quantity is calculated individually, including when using Percent of Whole Cart discounts.
  • Out-of-stock products: Products with a stock quantity of 0 are excluded from the discount.
  • Backorders: This condition does not prevent customers from ordering quantities beyond available stock. It only limits which quantities receive the discount.
  • Supported product types: Simple, Configurable, and Virtual products are supported. Grouped and Bundled products are excluded.

For additional information about configuring discounts, see Discount Rules and Common Discount Rules.