# Stock Validation in Cart

The **Stock Validation** feature ensures that customers can only purchase the quantity of items currently available in inventory. This update improves transparency, prevents overselling, and creates a smoother checkout experience.

***

### What’s New

**1) Real‑time stock message**\
When a customer attempts to add more items than are available, the system now displays a message clearly stating the maximum stock available.\
\&#xNAN;*Example: “Only 3 units left in stock.”*

**2) Automatic quantity adjustment**\
If a customer enters a quantity higher than available, the cart automatically adjusts the quantity to the maximum stock on hand.\
\&#xNAN;*Example: If a shopper requests 10 units but only 7 are available, the cart updates to 7 and notifies the customer.*

***

### Benefits

**1) Transparency**\
Customers know exactly how much stock remains, setting accurate expectations.

**2) Reduced cart errors**\
The system prevents failed checkouts due to unavailable quantities.

**3) Improved user experience**\
By automatically updating quantities, the process is seamless and avoids frustration.

**4) Inventory protection**\
Prevents overselling and ensures stock integrity across the platform.

**5) Increased trust**\
Shoppers appreciate clear communication about availability, which builds confidence in your store.

***

### How It Works

1. Customer adds an item to the cart.
2. If the requested quantity > available stock, a **toast notification** (or inline message) appears showing the stock limit.
3. The cart quantity is automatically corrected to the maximum available.
4. The customer can continue shopping or proceed to checkout with updated quantities.

***

### Summary

With the new **Stock Validation in Cart** updates, customers receive immediate feedback on product availability and benefit from automatic quantity adjustments. This improves the shopping experience, protects your inventory, and reduces cart abandonment caused by stock errors.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.storefront.co.za/release-notes/enhancements/2025-enhancements/october-2025-enhancements/stock-validation-in-cart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
