Skip to content

Powered by Grav CMS + Helios Theme

KahunaCart documentation

Native ecommerce for Grav 2.0 — products, cart, checkout, orders, digital delivery, and a payment-provider ecosystem.

Read in this order

Get running

  1. Getting started — requirements, install, your first product, and a test order with the built-in offline provider.
  2. Configuration — every config key with its default, database options, and the route cache.

Build the store

  1. Products and catalog — products, product types, variants, stock, priced add-on options, catalog order and featured products, categories, tags, attributes, related products, images, and downloadable files.
  2. Storefront — routes, template overrides, Twig functions, search and its three engines, instant filters, pagination, sectioned listings, SEO output, and the checkout flow.
    • Shortcodes — put a product grid, a buy button or a gallery into an ordinary page's Markdown, with no Twig in content and no theme change.
  3. The catalog index — the index behind every listing, facet count, sort and ranked search, when queries use it, and how to rebuild it.
  4. Customer accounts — the account area, store accounts, invoices, and the address book.
  5. Address validation — the optional address check at checkout, with Google or Mapbox.
  6. Theming — the --kahunacart-* custom properties and CSS class reference.
    • Theme blocks — change a storefront page's markup by extending it instead of copying it.
  7. Multilanguage — translated catalog text and language-prefixed routes. Skip on a single-language store.

Get the money right

  1. Tax — flat rate or zones, tax classes, inclusive pricing, and the EU VAT preset.
  2. Shipping — flat rate or zones, methods, shipping classes, and free-shipping thresholds.
  3. Coupons — coupon types, the discount basis, stacking, campaigns and bulk code generation, the restriction matrix, and conditions that keep a code to a customer group or to a cart that holds a given product.
  4. Sales — automatic scheduled discounts, rule precedence, quantity tiers, the storefront badge, and how sales interact with coupons.
  5. Price lists and quantity tiers — quantity discounts, price lists, customer eligibility rules, the selection algorithm, and current storefront support.
  6. Rules and conditions — the operations a discount prices through, the condition vocabulary, buy-one-get-one, and registering your own.
  7. Money conventions — every amount is stored in minor units, and how a per-line refund is allocated.
  8. Currencies: sell in more than one currency: the settings, typing a price in each or converting from the base price, exchange rates, how the shopper's currency is chosen, what a missing amount does, switching with a cart open, reports, caching and the add-ons.
  9. Store credit, gift cards and credit notes — one append-only ledger with the balance summed and never stored, gift cards on top of it, spending credit at checkout, refunding to credit, and the numbered credit note every confirmed refund earns.

Sell and deliver

  1. Payment providers — Stripe, Polar, PayPal, and the offline provider.
  2. Payment methods — several checkout options for one gateway: labels, logos, instructions, a taxed fee, and conditions that decide when each is offered.
  3. Digital products — files, download grants, delivery methods, and refunds.
  4. Product releases — versioned builds, publishing from CI, and who gets which version.
  5. Licenses — license keys, seats, updates windows, renewals, and the public validation API. Add-on.
  6. Catalog sync — keeping a provider's catalog in step with yours.
  7. Subscriptions — plans, billing modes, trials, renewal orders, and the customer and admin screens. Add-on.

Run it

  1. Orders and the admin — order status, the indexed order search, order history and notes, shipments and packing slips, refunds, bulk actions, the configurable export, and quotes.
  2. Order statuses — the three configurable status categories, the flags used by reports and add-ons, and how to add or rename a status.
  3. Order changes — editing a placed order by staging a change and confirming it, the version that keeps every earlier state readable, returns including damaged units, and the audited unlock.
  4. Customers, wishlists, reviews and retention — customer groups and the codes used in rules, named wishlists, reviews with a computed verified badge, the four-window retention schedule, and reassigning or erasing a customer.
  5. CLI — every bin/plugin kahunacart command.
  6. Reports and the rollup — the daily rollup the sales reports read, when its numbers are exact, and how to rebuild it.
  7. Analytics — comparison periods, published metric definitions, filters and breakdowns, where an order came from, and cost of goods and margin.
  8. Dashboard alerts — the strip at the top of the admin, the four checks that ship, hiding one, and registering your own.
  9. Importing — the CSV importer for products, variants, categories, customers and orders, with saved mappings, dry runs, resumable runs and error reports.
  10. Export and restore — the whole store in one zip and back: what a bundle holds and leaves out, customer password hashes and the keys sealed with a passphrase, full restore or merge, the dry run and the report, and moving a shop to a site of its own.
  11. Emails — the sixteen customer emails, resending one, and how to override their templates.
  12. Object templates — editable Twig templates for SKUs, line titles, the order reference, invoice file names and email subjects.
  13. Notifications — get told about your store by email, Slack, Discord, Telegram, Pushover, ntfy, Gotify, text message or a webhook.
  14. Hardening — web-server rules for the data directories, expiring order links, rate limits, trusted proxies, and reporting a vulnerability.
  15. Troubleshooting — symptoms, causes, and fixes.
  16. Benchmarking — seed a quarter of a million orders and time the queries behind the storefront and the admin.
  17. Performance — PHP-FPM, opcache and database settings for production, and where to start investigating slow performance.

Mail the list

  1. Newsletters — what the add-on is, what it needs, and the ten screens it adds to the admin.
  2. Getting started with the newsletter — install, the From address, the first list, the signup form and the first campaign.
  3. Subscribers, lists and tags — consent and confirmation, the five statuses, the preference centre, suppressions, and CSV import and export.
  4. Segments — saved filters for your audience, the condition vocabulary, and how counts refresh.
  5. Campaigns — writing, previewing, testing, scheduling, A/B subject tests, UTM tagging, and where each number comes from.
  6. Automations — the ten triggers, the six kinds of step, the three recipes, and how steps run once per minute.
  7. Reports — seven reports over a date range: campaign performance, list growth, engagement, links, bounces and complaints, automations and send times.
  8. Health — the nine deliverability checks over your domain, your transport and the last thirty days of sending.
  9. Delivery reports and providers — the provider webhook, what the store does with each event, and how reports are matched to messages.
  10. Settings reference — every newsletter config key with its default.
  11. Newsletters for developers — the storefront routes, the admin API, the events, the Twig function and the two registries.

Automate it

  1. Run the store from an AI assistant — connect grav-mcp, check the connection, and every KahunaCart tool an assistant can call.

Sell through AI agents

  1. Agentic commerce — the four parts that let AI shopping agents find and buy from the store, what an agent can and cannot do, and the setup checklist for Google AI Mode and Gemini, ChatGPT and MCP clients.
  2. Product feeds — the Google Merchant Center and OpenAI feeds: which products are rows, every field, and when the files are built.
  3. Storefront MCP — the public MCP server at {base}/mcp and its thirteen tools.
  4. UCP checkout — native checkout for Google's agents: the profile, sessions, Google Pay with Stripe, the continue_url handoff and signed order webhooks.

Extending KahunaCart

Quick reference

Storefront base route /shop (config key route); /de/shop on a multilanguage site
Webhook URL {site}/shop/webhook/{provider-slug}
Database user/data/kahunacart/db/kahunacart.sqlite
Downloadable files user/data/kahunacart/files
Product images user/images/kahunacart/products
Category images user/images/kahunacart/categories
Product search {site}/shop/search?q=
Rebuild the order search bin/plugin kahunacart orders:reindex
Rebuild the report rollup bin/plugin kahunacart reports:rebuild
Run the retention sweep bin/plugin kahunacart retention:run --dry-run
Export orders bin/plugin kahunacart export --orders orders.csv
Export the whole store bin/plugin kahunacart export --bundle=store.zip
Filtered listing {site}/shop?tag[]=organic&attr[material]=cotton&min=10&stock=1&sale=1
Customer account area {site}/shop/account (needs the Login plugin)
Admin Sidebar → KahunaCart (/plugin/kahunacart)
Health check bin/plugin kahunacart status
After a plugin update bin/grav clear-cache
Product feeds {site}/shop/feeds/google.tsv, google-checkout.tsv, openai.jsonl.gz (feeds.enabled)
Storefront MCP endpoint {site}/shop/mcp (storefront_mcp.enabled)
UCP business profile {site}/.well-known/ucp (ucp.enabled)
Agent readiness Admin → Agentic commerce, or bin/plugin kahunacart check

Known limitations

Each limitation below is also described on the relevant guide page.

  • A currency no rate source lists needs a rate you type. The European Central Bank lists about thirty currencies, and Frankfurter, which is asked for the rest by default, lists more than 160. For a currency neither lists, type the rate on the Currencies screen or use a source from an add-on. A currency set to convert with no rate stays unpriced. See Currencies.
  • Catalog sync creates the default variant only. Extra variants are recorded in the mapping row, not created at the provider. See Catalog sync.
  • An unallocated partial refund reverses nothing. A refund that names its lines restocks them and revokes their downloads; a refund that is only an amount cannot tell which items the money was for. See Orders and the admin.
  • A shipment cannot be deleted or voided. Recording one is the only write, and an under-shipment is corrected by shipping the remainder. Shipment records and download revocations cannot be reversed. See Orders and the admin.
  • A merchant-of-record provider charges no local tax. This is decided when the customer picks the payment method, so the cart page still shows the local estimate. See Tax.
  • Stripe ships hosted Checkout only. On-site Elements is planned for a later phase.
  • Returns have no exchanges yet. A customer who wants a different size returns the first one and places a new order. See Returns.
  • A status you add cannot mean "the payment was refused". The registry has no column for it, so a second refused-payment status is swept by the trash pending retention rule rather than the failed one. See The retention schedule.
  • An imported order records no adjustments, taxes or shipping lines. The file's own total is stored as authoritative, so an imported order's totals need not add up from its lines. See Importing.
  • Only Stripe charges Google Pay for an agent. Every other provider, PayPal included, sells to agents through the continue_url handoff to your own checkout. PayPal's Google Pay support is planned for a later phase. See UCP checkout.
  • ChatGPT's in-chat checkout (ACP) is not built. OpenAI dropped in-chat checkout in March 2026. The OpenAI product feed is built, and a ChatGPT buyer buys on your product page. See Agentic commerce.