# Changelog

Changes to the theme contract and to this documentation, newest first.

## 30 November 2026

- Documented [back-in-stock alerts](themes/javascript-apis.md#back-in-stock-alerts): `POST /back-in-stock/subscribe.js` and `/back-in-stock/subscribe/` save a "notify me" sign-up from an out-of-stock product page, and the platform e-mails the visitor when the product can be bought again. The endpoints already worked; they were missing from these docs.

## 29 November 2026

- Footer menus with nested links: in the `base` theme (1.19.0) a top-level link that has sub-links becomes its own footer column, with the link as the column heading. Links without sub-links stay in the menu column.
- [`category.image`](reference/objects/category.md) - the category image set in **Catalog → Categories**, next to the icon. `children.json` gives it as `image`. The `base` theme (1.17.0) shows it as a banner on the category page.
- [`category.additionalDescription`](reference/objects/category.md) - a second rich text description of the category. The `base` theme (1.18.0) shows it below the products on the first page.
- A guide to the fields of a store category on its page: [The category page](themes/templates.md#the-category-page).
- [`PATCH /themes/{id}`](themes/theme-api.md#patch-themesid) in the theme API marks a theme as managed outside the store (`managed_by`, for example a ShopDepot Studio draft). Package updates - nightly, the **Update** button and reset - no longer overwrite its code. The theme object has `managed_by` and `available_update`.
- Writing `config/settings_data.json` through [`PUT /themes/{id}/files/{path}`](themes/theme-api.md#put-themesidfilespath) (for example `shopdepot theme push --only config/settings_data.json`) now applies its `current` values to the theme's settings in the store. Before, the file was saved, but the storefront kept the old settings.
- [`GET /sample`](themes/theme-api.md#get-sample) in the theme API says what each category has: `heading`, `image`, `icon`, `icon_vector`, `has_description`, `has_additional_description`.

## 28 November 2026

- Alternate category templates: `templates/category.<suffix>.json`, chosen per store category in **Catalog → Categories**. See [Alternate templates](themes/templates.md#alternate-templates).

## 22 November 2026

- **The chat widget belongs to the platform.** When the merchant turns the chat on, it is added to every page of the theme, with its own styles. Themes no longer include it. See [The chat widget](themes/platform-pages.md#the-chat-widget).
- The `<head>` gets the CSS of only the sections and blocks used on the page. The rest of `_sections.css` loads after the page has loaded, so sections added later by JavaScript still get their styles.
- Theme JavaScript in `assets/*.js` is minified. Files named `*.min.js` are left as they are.

## 21 November 2026

- [`category.icon`](reference/objects/category.md) - the category icon set in **Catalog → Categories**, an image or an SVG. `children.json` gives it as `icon` and `icon_vector`.
- [`category.heading`](reference/objects/category.md) - the H1 of the category page, the name when left empty.
- SVG files in the media library: they are cleaned on upload (no scripts or external references) and have no renditions. [`file.vector`](reference/objects/file.md) says a file is an SVG.
- Pre-orders: [`variant.stockStatus`](reference/objects/variant.md) can be `onpreorder`, with `variant.preorder` and `variant.preorderDate`; [`product.preorder`](reference/objects/product.md) and `product.preorderDate` for the variant the page shows. [`query_products('preorder')`](reference/functions.md#query_products) lists offers in pre-order, nearest shipping date first.

## 15 November 2026

- **The MCP server** at `https://shopdepot.dev/mcp`: AI assistants search and read the docs, look up reference entries and check theme files against the save rules. [Connect it](themes/ai-assistants.md#connect-the-mcp-server) to Claude, Cursor or VS Code.
- **The `shopdepot` CLI.** [Install it](themes/cli.md) with `curl -fsSL https://shopdepot.dev/install.sh | sh`: `theme init`, `pull`, `push`, `dev` with a live preview, `check`, `open` and `package`. It works with developer tokens created in **Appearance → Themes → Developer access**.
- **The [theme API](themes/theme-api.md)** - the HTTP API behind the CLI, for your own tooling.
- Theme files written by a developer (code editor, CLI, API) are now checked against the [Twig sandbox](themes/twig-sandbox.md) when they are saved, not only when a page renders. A template that calls something the sandbox does not allow is refused with the reason.
- **shopdepot.dev launched.** Guides for theme developers and a reference generated from the platform code: [objects](reference/objects/index.md), [filters](reference/filters.md), [functions](reference/functions.md), [tags](reference/tags.md), [setting types](reference/setting-types.md), [page types](reference/page-types.md) and [core sections](reference/core-sections.md).
- Every page is available as Markdown (`.md` after the address), with [`/llms.txt`](/llms.txt) and [`/llms-full.txt`](/llms-full.txt) for AI assistants.
- Variant pictures: [`variant.featuredMedia`](reference/objects/variant.md). Galleries show the variant picture first when a variant is chosen.
- Several discount codes in one cart (up to five): `/cart/discount.js` adds a code, `remove` takes one off, and `/cart.js` lists them in `discount_codes`. In Twig: [`cart.discountCodes`](reference/objects/cart.md). See [Discount codes](themes/javascript-apis.md#discount-codes).
- `image_tag` adds a `srcset` with the renditions of a media library image (320 to 2400 px). Give it an honest `sizes`. See [`image_tag`](reference/filters.md#image_tag).
- PNG and JPG files in `assets/` get a WebP copy automatically, and `asset_url` serves it. See [Images that belong to the theme](themes/assets.md#images-that-belong-to-the-theme).

## 14 November 2026

- [`cart_summary()`](reference/functions.md#cart_summary) - the platform cart summary with coupon, discounts, delivery and total. Coupons apply in place and fire `shopdepot:cart:changed`.
- [`form('contact')`](reference/functions.md#form) - the contact form as a platform component with stable `sd-form__*` classes, extra fields and a fixed subject.

## 13 November 2026

- Alternate product templates: `templates/product.<suffix>.json`, chosen per offer.
- Page templates by address: `templates/page.<last segment>.json`.
- `templates/404.json` renders the store's not found page.
- [`cart.shippingFrom`](reference/objects/cart.md) and `shipping_from` in `/cart.js` - the cheapest delivery computed like checkout.
- [`cart.taxTotal`](reference/objects/cart.md) - the VAT included in the cart total, for "including X tax".
- Product option fields (engraving, gift wrap, size): [`product.optionFields`](reference/objects/product.md) on the product page, sent with the add-to-cart form as `properties[<field id>]`. See [Add to the cart](themes/javascript-apis.md#add-to-the-cart).
- [`query_products`](reference/functions.md#query_products) takes `in_stock` to leave out offers that cannot be bought.

## 12 November 2026

- Menu levels on demand: `link.hasChildren`, `link.childrenUrl` and `/categories/<handle>/children.json`.
- Feature index layout settings: `feature.layout`, `feature.showAlphabet`, `feature.showSearch`, `feature.showCount`, `feature.sort`.
- The platform writes the document `<title>` from the store's SEO templates; `seo_title` is available to layouts.

## 11 November 2026

- The core section library grew into store sections: `hero-tiles`, `product-list`, `term-grid`, `logo-wall`, `newsletter`, `testimonials`, `post-list`, `faq`. A theme file with the same name replaces a core one.
- Data functions [`query_products`](reference/functions.md#query_products), [`query_posts`](reference/functions.md#query_posts), [`query_terms`](reference/functions.md#query_terms).
- Images without a `loading` attribute are lazy by default - give the first visible image `fetchpriority="high"`.
- Storefront HTML is minified; pages are cached for all visitors.
