Search by

bnomei / kirby-kart

bnomei

Streamlined E-Commerce Shopping Cart Solution

Package info

github.com/bnomei/kirby-kart

Type:kirby-plugin

pkg:composer/bnomei/kirby-kart

Statistics

Installs: 1 318

Dependents: 0

Suggesters: 0

Stars: 38

Open Issues: 4


README

Kirby 6 PHP 8.3 Release Downloads Unittests PHPStan Discord Buy License

Streamlined E-Commerce Shopping Cart Solution

Kirby 6 compatibility

Kart 6.x supports Kirby 6 and requires PHP 8.3 or newer. Kirby 5 sites should stay on Kart 5.x.

Use a disposable checkout: composer testBefore replaces product, stock and order fixtures. Run composer kirby, composer testBefore, then KIRBY_HOST=kart.test composer test for the PHP suite.

In an Amp orb, run composer testBefore && tests/panel-smoke.sh for the Chromium check. It starts a loopback-only Panel, signs in with a temporary admin, checks catalog chips and gallery order, edits a price, verifies the stored price after reload, and opens Stocks and Orders. It removes its account and product and stops the server on exit. Run composer testAfter to remove the seeded catalog.

Existing kart-magic-link entries in auth.methods continue to enable frontend login/signup, in both list and map configurations. No configuration migration is required:

'auth' => [
    'methods' => ['password', 'kart-magic-link'],
],

Alternatively, include kart-magic-link in auth.challenges. Either option enables the frontend endpoints; omitting it from both disables them. The method flag adds no Panel login option.

Kart's frontend routes send signed standalone login links, independent of Panel second-factor requirements. Registering the challenge in auth.challenges also makes it available to Kirby's native authentication flows, where it uses Kirby's email-code form and second-factor rules.

Installation

  • Composer: composer require bnomei/kirby-kart:^6.1
  • ZIP: unpack the v6.1.2 release into site/plugins/kirby-kart.
  • Git submodule: git submodule add https://github.com/bnomei/kirby-kart.git site/plugins/kirby-kart, then git -C site/plugins/kirby-kart checkout v6.1.2.

Licensing

Kirby Kart is a commercial plugin that requires a license. You can install and test the plugin locally without a license. However, production environments require a valid license. You can purchase a license here.

Quickstart

  1. ⬇️ Install Kart using one of the methods above.
  2. 🏎️ Access the /kart-route on your local setup to initialize Kart and start the demo.
  3. 🪞 Copy the snippets and templates from the plugin into your project site-folder.
  4. 🎨 Modify the copied snippets and templates to match your projects style and site structure.
  5. 🔗 Link Kart to a Provider (like Stripe or Paypal) and fetch your products from them. Alternativly use Kirby to manage the products and the provider only for checkout.
  6. 💅 Enhance your products within Kirby with additional text, images and downloadable files.
  7. 🪪 Buy a license for Kirby Kart, register it in the config-file and go online with your shop.
  8. 💰 The streamlined shopping cart, invoices and downloads will make your customers happy.
  9. 📈 Track orders and remaining stock within Kirby.

Documentation

You can find the full documentation for Kirby Kart on its dedicated website.

Cart URL

The cart page defaults to /cart. To serve it at /warenkorb, add this to site/config/config.php:

return [
    'bnomei.kart.cart.page' => 'warenkorb',
];

Use a single slug made of lowercase letters, digits and hyphens, without a leading slash. Kart uses an existing Kirby page with that slug if present; otherwise it renders its built-in cart template. In your own templates, link to kart()->urls()->cart() so the link follows the setting. The /kart/… checkout endpoints are unchanged.

Provider feature matrix

Provider Hosted Checkout Order Flow Product sync Hosted Portal Invoice URL
chargebee ✅ return URL ✅ ✅ ✅
checkout ✅ return URL - - -
fastspring external - ✅ - -
gumroad external webhook ✅ - ✅
invoice_ninja ✅ webhook ✅ - ✅
lemonsqueezy ✅ return URL, webhook ✅ ✅ ✅
mollie ✅ return URL - - -
paddle JS snippet return URL ✅ ✅ ✅
paypal ✅ return URL ✅ - -
polar ✅ return URL ✅ - ✅
shopify ✅ webhook ✅ - -
snipcart JS snippet webhook ✅ - -
square ✅ return URL - - ✅
stripe ✅ return URL ✅ ✅ ✅
sumup JS snippet return URL - - -

Stripe invoice sync

Kart reads the Stripe invoice number and link on the checkout return when available. To also sync invoices that arrive later, create a Your account → Snapshot webhook destination in Stripe Workbench for invoice.paid only. Use the shop's HTTPS /kart/provider-webhook URL and set the endpoint signing secret (whsec_…) as bnomei.kart.providers.stripe.webhook_secret (or STRIPE_WEBHOOK_SECRET with the DotEnv plugin). Use the same canonical shop URL for checkout and webhook delivery, and a separate destination and secret for your Stripe sandbox.

The webhook only updates invoices for existing Kart orders from newly tagged checkouts. It does not create orders or change fulfillment. Automatic late sync needs one free Stripe invoice metadata slot for kart_invoice_ref. If Stripe sends the invoice before the checkout return creates the order, Stripe can retry delivery.

Provider product sync

For providers with product sync, configure their API credentials under bnomei.kart.providers.<provider> and grant read access to the catalog. For example, Stripe needs bnomei.kart.providers.stripe.secret_key (or STRIPE_SECRET_KEY with the DotEnv plugin) and access to both products and prices. If a refresh fails, the Panel shows an error without changing the last cached catalog or its sync timestamp. If you copied the products blueprint into your site, replace the Sync Provider button's link with dialog: '{< site.kart.urls.sync_dialog() >}'. The old link only opens Products; sync runs on dialog submission.

Shopify product metafields

Shopify product metafields can be added to the product's raw provider data with an allowlist of namespace.key values:

return [
    'bnomei.kart.providers.shopify.metafields' => [
        'custom.product_details',
    ],
];

The Shopify app needs the read_products and read_metaobjects access scopes. Scalar values and one level of referenced metaobjects are available under $product->raw()->yaml()['metafields']; nested references are not resolved.

Disclaimer

This plugin is provided "as is" with no guarantee. You can use it at your own risk and always test it before using it in a production environment. If you find any issues, please create a new issue.

License

Kirby Kart License © 2025-PRESENT Bruno Meilick