---
title: "Verify a cart explains a product made unavailable before revisit"
description: "Unpublish a fixture product after it enters a cart and verify returning shoppers see a clear unavailable state and can remove it without blocking other items."
canonical_url: "https://vostride.com/agent-library/shopping-cart/unavailable-item-return.md"
md_url: "https://vostride.com/agent-library/shopping-cart/unavailable-item-return.md"
content_kind: "recipe"
topic: "shopping-cart"
---

# Verify a cart explains a product made unavailable before revisit

Unpublish a fixture product after it enters a cart and verify returning shoppers see a clear unavailable state and can remove it without blocking other items.

## Risk

Persistent carts can outlive catalog availability. The application should not silently charge for an unavailable product or let one obsolete line make the entire cart unusable when other products remain purchasable.

## Fixtures

- A test account cart with one product that will be unpublished and one still-available control product.
- A supported catalog fixture hook that unpublishes only the designated run-owned product.
- A documented unavailable-cart-item policy and hooks reading catalog status, cart eligibility, and payable total.

## Steps

1. Open the cart while both products are available and verify each line and the initial total.
2. Unpublish the designated product using the supported fixture and confirm its catalog state independently.
3. Revisit or reload the cart and verify the unavailable item is identified with the documented explanation and checkout treatment.
4. Remove that unavailable item and verify the control product remains with its original quantity and correctly recalculated payable total.
5. Proceed to final checkout review without payment and verify only the control product is eligible; inspect cart state to confirm the unavailable line no longer participates.

## Expected results

- Catalog unavailability is reflected when the persistent cart is revisited.
- The unavailable product cannot silently remain eligible for an unsupported purchase.
- Removing it preserves a usable checkout path for the remaining product.

## False-pass traps

- Deleting the entire cart would conceal whether one invalid line can be handled independently.
- A dimmed image alone does not establish that checkout excludes or blocks the unavailable product.

## Cleanup

- Republish the fixture product and clear the run-owned cart.

## Use with agent-qa

Adapt this test design to your application's acceptance criteria and configured target using the [recipe execution guide](/agent-library/software-factory/turn-a-recipe-into-an-agent-qa-test.md). External fixture setup and non-UI checks require your own supported hooks or test tooling. Validate the authored test, execute it, and inspect the completed evidence; this recipe is not a recorded test result.

## References

- [agent-qa test](/docs/agent-qa/configuration/test.md)
- [agent-qa hooks](/docs/agent-qa/guides/hooks.md)
- [agent-qa auth state](/docs/agent-qa/guides/auth-state.md)

- [Shopping cart QA recipes](/agent-library/shopping-cart.md)
- [Software factory QA library](/agent-library.md)
