---
title: "Add-to-cart button in the initial HTML · Specoria"
description: "Add-to-cart button in the initial HTML: Browser agents (ChatGPT agent, Comet, Operator) need to find the button to add to cart."
source_url: "https://specoria.com/method/checks/add-to-cart/"
lang: "en"
---

[← All checks](https://specoria.com/method/checks/)
add_to_cart

# Add-to-cart button in the initial HTML

Why it matters Browser agents (ChatGPT agent, Comet, Operator) need to find the button to add to cart.

**Category**
Action (cart and orders)

**Weight**
5 of 100 points

**Critical blocker**
No. If it fails, it only costs its own weight.

**Applies to**
Online stores

**Effort**
1 day · developer

**Score model**
v2.4

## How we measure it

We look for an add-to-cart signal in the product page’s initial HTML: a cart form, cart attributes or “Add to cart” text. Present passes, absent fails.

### What the result page says

These are the sentences in the test result; “…” is replaced by what we found on your site.

- Passed An add-to-cart button or form is in the initial HTML.
- Passed With a real browser we found the button and added the product to the cart.
- Failed No add-to-cart button was found in the initial HTML; it may be drawn entirely by JavaScript.

## How to fix it

**Target:** Add to cart is a real <button> or form in the initial HTML.

### Example code

`<form action="/cart/add" method="post">
<input type="hidden" name="id" value="SKU-001">
<button type="submit">Add to cart</button>
</form>`
Example values (example.com, product name, price) are placeholders; replace them with your own.

### How to verify it yourself

View the source and look for the “Add to cart” button or a /cart form.

### Fix it with an AI coding agent

Paste this into Claude Code, Cursor or another coding agent working on your store’s code. Review the change before you deploy it.

`You are working on my online store. Specoria’s agent readiness test checks the item below. Fix it so AI shopping agents can read the store and act on it.

## 1. Add-to-cart button in the initial HTML (add_to_cart)
Target: Add to cart is a real <button> or form in the initial HTML.
Example fix (adapt it to this codebase and platform; example values are placeholders):
```
<form action="/cart/add" method="post">
<input type="hidden" name="id" value="SKU-001">
<button type="submit">Add to cart</button>
</form>
```
Reference: https://specoria.com/method/checks/add-to-cart/

## Rules
- First look through the codebase and tell me which files or templates you will change, before editing anything.
- Change only what these checks need, and keep the visible page and the structured data saying the same thing.
- Never invent prices, stock, shipping or return terms, reviews or product identifiers (GTIN): take them from the store’s real data or ask me.
- Don’t block or slow down real visitors and don’t add tracking.
- After deploying, run the free test again at https://specoria.com/ to verify the fix.`

## Where it sits in the 196-criteria framework

The result of this check counts as evidence for these items of the readiness framework:

- `0.add_to_cart` Shopping flow (Specoria) section

[The framework and its source →](https://specoria.com/method/#criteria)

[← PreviousTaxes-included wording](https://specoria.com/method/checks/price-transparency/)[Next →Is the cart button accessible?](https://specoria.com/method/checks/cart-accessible/)

[Run the free test](https://specoria.com/method/checks/add-to-cart/#test) [See the sample report →](https://specoria.com/reports/sample-report/)

## Related

- [Is the cart button accessible?](https://specoria.com/method/checks/cart-accessible/)
- [Buying without an account](https://specoria.com/method/checks/guest-checkout/)
- [Agent simulator](https://specoria.com/agent-simulator/) Watch AI agents shop a store in a real browser
- [Agent protocol map: UCP, ACP, AP2, MCP, WebMCP](https://specoria.com/agent-protocols/) What each protocol does and what the free test checks

FREE TEST

## Test your store now

Enter your store’s address: 27 checks on your public pages, the way a shopping agent reads them.

The free test runs in your browser and needs JavaScript. [Request the free deep audit by email instead →](https://specoria.com/#contact)

Your result opens on its own page. Want the full picture? The free deep audit and panel come next, by email.
