The best Astro ecommerce template gives you fast product, category and collection pages built from your catalog data, then hands the cart and payment to a commerce service such as Shopify, Snipcart or Stripe. Astro is not a shopping cart itself. It builds the storefront, and that split is what makes Astro stores fast: product pages are static HTML, and only the cart loads JavaScript.
We sell Astro themes, including store themes, so weigh our picks with that in mind. Below is how commerce works with an Astro template, the free routes, ten picks from our catalog by kind of shop, and a product page pattern with structured data.
Key Takeaways
- An Astro ecommerce template supplies the storefront pages; a commerce service supplies cart, checkout, payments and inventory.
- Pick the commerce service first, then the theme. The service decides how products reach your pages.
- Small catalogs can live in a content collection; large or fast-changing catalogs should load from the commerce API at build time.
- Free routes include Astro’s starters plus a commerce SDK, and the store themes on astro.build/themes.
- Our Retail & E-commerce category holds 73 Astro themes for fashion, jewelry, homeware, books, drinks and collectibles.
How an Astro ecommerce template works
Every Astro store has two halves:
- The storefront (Astro). Home, collection, category and product pages, plus About, FAQ, shipping and returns. Built to static HTML from your product data.
- The commerce service. Cart, checkout, payments, tax, inventory and order emails. Hosted by the provider.
Our themes, like most Astro store themes, ship the first half: designed shop, category and product pages with demo products. You connect the second half. Common choices:
| Commerce service | How it connects | Best for |
|---|---|---|
| Shopify (Storefront API) | Fetch products at build time, Shopify checkout | Larger catalogs, existing Shopify stores |
| Snipcart | Add-to-cart buttons with data attributes, overlay cart | Small to medium catalogs on a static site |
| Stripe Payment Links or Checkout | A link or button per product | A handful of products, digital goods |
| Lemon Squeezy, Gumroad and similar | Hosted checkout links | Digital products and downloads |
Our guides cover each route: the Shopify storefront guide, the Snipcart guide and the Stripe Checkout guide.
What to look for in a store template
- Collection and category pages. Shoppers browse before they search. A theme without category pages leaves you building them.
- A product page with room for detail. Multiple images, variants, size guides, materials, shipping notes and FAQs.
- Supporting pages. FAQ, shipping and returns, About and Contact. They answer the questions that stop a purchase.
- Image handling. Product photos are the heaviest part of a store. The theme should use
astro:assetsor let you add it easily. - Clean data boundaries. Product data in one place (a collection or an API call), not hard-coded in twenty components.
Free routes to an Astro store
- An official starter plus a commerce SDK.
npm create astro@latest -- --template minimal, then fetch products from your provider. This is the most flexible route for a developer. - Free store themes on the Astro themes directory. Filter by e-commerce and free. Quality varies, and many are demos for one provider.
- AstroWind for a brand site that sells a few products through payment links.
Free works if you are a developer and the store is small. A designed store theme saves the most time on collection and product pages, which are the slowest to get right.
Ten Astro ecommerce templates from our catalog
Our Retail & E-commerce category holds 73 Astro themes. Each is a complete Astro 7 project with TypeScript, a live preview and static output, ready to connect to the commerce service you choose.
Commerce X: a general multi-layout store
Commerce X ($39) is a multi-layout e-commerce template with three home page versions and three all-products layouts. It is our most flexible general store pick when you want to try layouts before settling on one.
Apparel X: a fashion and apparel shop
Apparel X ($39) focuses on fashion and apparel, with category pages for t-shirts, hoodies, sweaters and accessories. Choose it for a clothing brand with clear product types.
Clarkson: a minimal fashion store
Clarkson ($39) is a clean, minimal store for clothing and creative brands, with Shop, individual product pages and a Press page. The Press page suits a brand with coverage to show.
Airmin: a single-product or small shop
Airmin ($39) is designed for single-product shops and small inventories, with Shop, FAQs, Blog and two home layouts. Pair it with payment links if you sell one or two products.
Axels: a jewelry store
Axels ($39) is built for jewelry stores, with three shop layouts and three home page variants. Its restrained design suits high-value products shown with large photos.
Ceramika: homeware by category
Ceramika ($39) is an e-commerce UI kit for ceramics and tableware, with category pages for cups, pitchers, plates and sets, plus Shop and FAQ. It fits any homeware brand with a few clear product families.
Gearo: tools and equipment
Gearo ($39) targets tools and equipment stores, with Shop, FAQs, Blog and two home layouts. Choose it for a practical catalog where buyers compare specifications.
Alehous: a brewery with a shop and events
Alehous ($39) is designed for breweries, with Beers, Events, two shop layouts and a user account page design. It adapts to other food and drink producers that sell direct.
Stonecrop: a winery that sells by the bottle
Stonecrop ($29) is built for a small winery. Each wine page carries the details buyers ask about, such as block, picking date, alcohol, acidity, bottles made and drinking window, beside tasting notes. It also has Visit, Estate and Journal pages, and it sits in both Food & Drink and Retail.
Toonhub: limited drops and collectibles
Toonhub ($19) is organized by drop rather than stock, for collectibles and limited editions. Each figure has a product page with finishing notes, and the Drops section works as a release log. Choose it if your products sell out and do not return.
Quick comparison
| Theme | Price | Best for | Notable pages |
|---|---|---|---|
| Commerce X | $39 | General store | Three product listing layouts |
| Apparel X | $39 | Clothing brand | Category pages by product type |
| Clarkson | $39 | Minimal fashion | Product pages, Press |
| Airmin | $39 | One or few products | Shop, FAQs |
| Axels | $39 | Jewelry | Three shop layouts |
| Ceramika | $39 | Homeware | Category pages, FAQ |
| Gearo | $39 | Tools and equipment | Shop, FAQs, Blog |
| Alehous | $39 | Brewery | Beers, Events, Shop |
| Stonecrop | $29 | Winery | Wine detail, Visit, Estate |
| Toonhub | $19 | Limited drops | Figure detail, Drops |
Cart, checkout and account behavior in any of these comes from the service you connect. The themes provide the page designs.
Product pages with structured data
Product rich results in search need Product structured data with a price and availability. Generate it from the same data that renders the page, so the two cannot disagree. For a small catalog, a content collection works well:
// src/content.config.ts
import { defineCollection } from 'astro:content';
import { glob } from 'astro/loaders';
import { z } from 'astro/zod';
const products = defineCollection({
loader: glob({ pattern: '**/*.md', base: './src/content/products' }),
schema: ({ image }) =>
z.object({
name: z.string(),
price: z.number(),
currency: z.string().length(3).default('USD'),
inStock: z.boolean(),
sku: z.string(),
photo: image(),
checkoutUrl: z.string().url(),
}),
});
export const collections = { products };
---
// src/pages/products/[id].astro
import { getCollection, render } from 'astro:content';
import { Image, getImage } from 'astro:assets';
export async function getStaticPaths() {
const products = await getCollection('products');
return products.map((product) => ({ params: { id: product.id }, props: { product } }));
}
const { product } = Astro.props;
const { name, price, currency, inStock, sku, photo, checkoutUrl } = product.data;
const { Content } = await render(product);
const ogImage = await getImage({ src: photo, width: 1200, format: 'jpg' });
const schema = {
'@context': 'https://schema.org',
'@type': 'Product',
name,
sku,
image: new URL(ogImage.src, Astro.site).href,
offers: {
'@type': 'Offer',
price: price.toFixed(2),
priceCurrency: currency,
availability: inStock ? 'https://schema.org/InStock' : 'https://schema.org/OutOfStock',
url: new URL(Astro.url.pathname, Astro.site).href,
},
};
---
<script type="application/ld+json" set:html={JSON.stringify(schema)} />
<Image src={photo} alt={name} widths={[480, 960, 1440]} sizes="(min-width: 900px) 50vw, 100vw" priority />
<h1>{name}</h1>
<p>{new Intl.NumberFormat('en-US', { style: 'currency', currency }).format(price)}</p>
<Content />
{inStock ? <a href={checkoutUrl}>Buy now</a> : <p>Sold out</p>}
Here checkoutUrl is a hosted checkout or payment link. With Snipcart or Shopify, replace the link with their add-to-cart button and keep the rest. For larger catalogs, swap the glob() loader for a custom loader that fetches from your commerce API; the page code stays the same. The official content loader reference covers writing a loader.
Prices, stock and rebuilds
A static product page shows the price and stock level from the last build. That is fine for most small shops, with two safeguards:
- The checkout is the source of truth. The commerce service always charges the current price and checks stock, so a stale page cannot oversell.
- Rebuild on change. Most commerce services can call a webhook when a product changes. Point it at your host’s deploy hook so the site rebuilds within minutes.
If stock changes by the minute, render the stock line with a server island or a small client-side fetch and keep the rest of the page static. Our product page checklist lists the other details that affect conversion.
FAQ
Can you build an ecommerce site with Astro?
Yes. Astro builds the storefront pages, and a commerce service such as Shopify, Snipcart or Stripe handles the cart, checkout and payments. This keeps product pages static and fast while checkout runs on the provider’s secure pages.
Does an Astro ecommerce template include a shopping cart?
Usually not a working one. Astro store themes provide designed shop, category and product pages. The cart and checkout come from the commerce service you connect, which also handles payments, tax and order emails.
Is Astro good for a Shopify storefront?
Yes, for stores that want a fully custom, fast storefront. Fetch products from the Shopify Storefront API at build time and send shoppers to Shopify checkout. Very large catalogs may need on-demand rendering for some pages.
What is the best Astro template for a clothing store?
Apparel X suits brands with clear product types because it ships category pages for each. Clarkson suits a minimal fashion brand, and Commerce X suits a store that wants several layout options.
How many products can a static Astro store handle?
Thousands of product pages build fine as static HTML, though build time grows with the catalog and the number of image sizes. For very large or fast-changing catalogs, render some routes on demand with an adapter instead.