Skip to content

Product card

Products with their price and the one it replaces, rating, stock, merchant and options — as tiles, rows or one product in detail.

On this page
Open
The product card, in an aparté chat The product card, in an aparté chat

A shopping tool’s answer as a shop would show it: the photo, the price in the chat’s language and the product’s currency, the price it replaces with the discount worked out (never read from text), the rating, whether it is in stock, the merchant and the delivery.

Open

One row per product: for a comparison, or a list longer than three.

Open

One product at length: its options as chips and its description.

Open
bash
npm install @aparte/plugin-cards @aparte/core
ts
import { setupProductCard } from '@aparte/plugin-cards/product';

setupProductCard({
  tool: 'search_products',
  variant: (data) => (data.products.length === 1 ? 'detail' : 'card'),
});

Its reader takes the shapes shops already return — schema.org Product, Shopify, Google Shopping — and prices written as text ("1.299,00 €"), so map is often not needed. The fields are in the guide.