E-commerce 0.5.4: Carts follow a base currency change, and storefront fixes
E-commerce 0.5.4 is a review release for the 0.5 line. Its main fix is for open carts after the shop’s base currency changes: the cart is now converted before anything new goes into it, so a new line is no longer added unconverted or converted twice.
Other fixes:
- Shipping methods in the cart and checkout show their prices in the cart’s currency, and the free-shipping badge compares like with like.
- A crafted address with odd filter parameters no longer crashes the catalog, category and product pages.
- Catalogue search matches translated names, and the admin category search works under the catalogue product source.
- The Shopify variants sync can create attribute sets again, and the media sync skips a product that fails instead of stopping the run.
- The image importer checks the size before downloading and pins the address it validated.
Upgrading
The module now needs PhoenixKit core 2.16 or later; earlier cores failed on every cart write.
Full release notes: E-commerce 0.5.4
0.5.4 · 13 September 2026
Week review of 0.5.0–0.5.3 (PRs #32–#55); findings and resolutions in
dev_docs/pull_requests/2026/week-2026-09-13-review/CLAUDE_REVIEW.md.
Fixed
- An open cart is rebased after a base-currency change. New
rebase_cart/1runs before add-to-cart, rate refresh, guest merge and conversion, so a cart frozen against the old base can no longer receive a new-base line unconverted (same-currency cart) or double-converted (foreign-currency cart). Drift reports nothing for a stale cart. - Shipping methods are listed in the cart’s currency. Cart and
checkout showed base-currency amounts under the cart’s symbol, and the
FREE badge compared a display subtotal to a base threshold; both now go
through
present_shipping_method/2. - A crafted storefront query string no longer 500s.
?vendor[x]=yand?price_min[]=1crashed every catalog, category and product mount. - Catalogue search matches translated names, and the admin category search works on the catalogue source (it was a silent no-op).
- Shopify variants sync passes the acting user to attribute-set creation; entities requires a creator, so every set creation failed against the current catalogue.
HtmlToMarkdownkeeps</>encoded in text — an escaped<script>example no longer becomes a raw HTML block — and dropsjavascript:links to plain text.- Image importer: DNS-rebinding guard and streamed size cap. The
validated address is pinned for the connection (hostname kept for
SNI/verification);
content-lengthis checked before the body and the download halts at the limit instead of buffering first. - Media sync isolates a crashing product instead of failing the run and
retrying from the first product; an image with no
srcis recorded, not raised. - Base-currency reprice no longer broadcasts per product from inside billing’s transaction.
- Admin status filter agrees with the storefront on retired catalogue items
with a stale
shop_status; numericprice_modifiersleaves are stringified (and validated) rather than silently treated as zero; legacy facet SQL honours the schema prefix; retired-category “still reachable” warning removed from the shop-status column; settings whitelist for category display/icon modes; a non-additive Shopify variant matrix now records a per-product warning instead of under-pricing silently. - Test harness applies entities’ and catalogue’s migration chains when
the catalogue path bridge is on; the 136
:catalogue-tagged tests failed on setup (undefined_column: slug) before this. - Gettext catalogues re-extracted; every ru/et/de/fr entry translated.
Changed
- ⚠️
phoenix_kitfloor~> 2.15→~> 2.16. The cart-freeze columns are core’s V186, first shipped in 2.16.0; 2.15.x (V183) raisedundefined_columnon every cart write. Existing lockfiles already resolve 2.22.x, so only a host pinned to 2.15 is affected. - Storefront pages re-fetch products once per rate batch (coalesced 250 ms) instead of once per changed currency; name-prefix stripping reads the setting once per render instead of once per name; Shopify sync page caches row diffs instead of recomputing them on every render; checkout conversion validates catalogue lines in one query.
fx_rate_drift_alert_pctis read asshop_fx_rate_drift_alert_pct; the old key still applies while the new one is unset.- Oban queue documented correctly as
shop_imports(README, AGENTS.md, install task); AGENTS.md dependency, tree and settings sections brought up to date; 0.5.0 entry now records the floor raises it shipped.
E-commerce 0.5.4. Install or update: {:phoenix_kit_ecommerce, "~> 0.5"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.