SMF·ECWID
Can a prompt replace Ecwid?
Online stores & courses — digital products, courses and memberships
Exhibit tracking slip
Verdict
Ecwid's whole premise is that you keep your existing website and add commerce to one page of it. Rebuilding that means the store is a script tag: catalogue, cart and checkout rendered into someone else's HTML, on a domain you do not control, without breaking their styles. That constraint is what makes it interesting and what makes it a weekend rather than an evening — cross-origin state, cart persistence, and CSS that has to survive whatever theme it lands in.
Exhibit A — The prompt
Received on31.07.2026Build an embeddable store: a hosted admin plus one script tag that adds commerce to an existing website.
Admin: products with a title, description, images, price, currency, stock count, and options (size, colour) producing variants with their own SKU and stock. Coupon codes with a percentage or fixed discount and an expiry. Orders with a status.
The embed, which is the point of this build. A single script served from your own domain that the site owner drops into their page, with a container element carrying data attributes for what to render: the whole catalogue, one category, a single product, or a cart widget. It must:
- Render inside a shadow root so the host page's CSS cannot affect it and its own CSS cannot leak out. This is not optional — it is the difference between a widget that works on any theme and one that needs per-site fixes.
- Read its own configuration from the data attributes, with no global variables and no assumptions about jQuery or any host framework.
- Persist the cart in localStorage keyed by store id, so the cart survives navigation across the host site's pages without any server session.
- Be under 40 KB compressed, and load without blocking the host page's render.
- Expose a small event API (item added, cart opened, checkout started) on a namespaced custom event, so the site owner can wire their own analytics.
Checkout: on checkout, POST the cart to your server, which re-prices every line from the database — never trust prices sent by the browser — validates stock, and creates a Stripe hosted Checkout session. Fulfilment happens in the webhook: verify the signature, check idempotency, decrement stock atomically, create the order, and email a receipt. Restock on refund.
CORS: the store's API accepts requests only from an allowlist of origins configured per store, so someone else cannot embed your catalogue on their site and take orders through it.
Admin views: order list with search, stock levels with a low-stock threshold, a manual order-status change with an audit trail, and CSV export.
Tax: do not calculate or remit any tax. State in the README that the operator is the seller of record.
Out of scope: shipping-rate calculation with carriers, marketplace or social-channel sync, point-of-sale integration, a hosted storefront theme, and subscriptions.
Opening prefills the prompt — press enter to run it.
Exhibit B — What you lose
- B.1 VAT and sales tax calculated and remitted for you
- B.2 the channel integrations that push your catalogue to marketplaces and social shops
- B.3 inventory sync with a point-of-sale system
- B.4 the ready-made storefront themes
Prior art
Exhibit C — Why people still pay: payments, tax, distribution, and operations
Because a store embedded in someone's existing site has to work in every theme, every browser and every checkout flow the owner never tests, and that compatibility surface is what a platform absorbs.
Questions
Can I export my Ecwid catalogue?
Yes. Ecwid exports products, variants and orders as CSV, and the product import maps cleanly. Images are referenced by URL and need downloading separately. Customers can be exported too, though existing carts obviously cannot.
Why a shadow root rather than an iframe?
An iframe is easier to isolate but cannot size itself to its content without a resize script, and it breaks the flow of a page badly on mobile. A shadow root gives the same style isolation while the widget participates in normal page layout, which is what makes an embedded catalogue feel like part of the site.
What does it cost to run?
Stripe's transaction fee, plus a small VPS with PostgreSQL at five to ten dollars a month and image storage in cents. Below a few hundred orders a month this is meaningfully cheaper than the Venture plan; the saving disappears the first time you spend a day on tax.
What is the one thing that does not survive the rebuild?
Selling anywhere but your own page. Ecwid's real leverage is that the same catalogue appears on your site, on Instagram, on a marketplace and in a point-of-sale terminal. An embed script reaches exactly one website.
Related tools
Receipt