Skip to content

E-commerce 0.5.20: Checkout in the shop's own country and a stock tracking switch

E-commerce 0.5.20 starts checkout in the shop’s own country, uses Billing’s full profile form at checkout, adds a Stock tracking switch and makes Shopify sync something you turn on.

What changed

  • A new cart no longer opens checkout on Estonia. The country comes from the company country, the default tax country, the one country all active shipping methods share, or the first priority country.
  • The checkout billing step shows Billing’s own profile fields with live checks, and a signed-in buyer can save the details as a billing profile. Switching between individual and company no longer blocks checkout with errors from the hidden fields.
  • The settings page has a Stock tracking switch. It only takes effect with the Warehouse module installed and enabled.
  • The shop page and category pages share the category list and filters for about a minute. Edits made in Catalogue show within that minute.

Upgrading

Run mix phoenix_kit.update. Shopify sync is now off by default, and the update’s migration V3 switches it on for shops that already use Shopify. Without it, the Shopify tab disappears until you turn the toggle on. The module now needs Billing 0.20 or later.

Full release notes: E-commerce 0.5.20

0.5.20 · 11 October 2026

Added

  • Storefront category and facet cache (#79). /shop and the category page share the category list and the filter facets for about a minute (StorefrontCache, started through children/0), and the category-image query no longer ships every item’s data. This package’s own product, category, filter and Shopify-sync writes clear the cache; edits made in phoenix_kit_catalogue show within the TTL.
  • Stock tracking switch (#81). A settings card for shop_stock_tracking_enabled, effective only while the optional phoenix_kit_warehouse (~> 0.5) is installed and enabled.
  • Checkout starts on the shop’s own country (#76). A new cart with no shipping country no longer opens on EE: the country comes from the company country, shop_default_tax_country, the one country every active shipping method shares, or the first priority country. EE remains the last resort.
  • Checkout uses billing’s profile form and can save the profile (#77). The billing step renders billing’s shared fields (type switch, middle name, second address line, state, company details) with live validation. A logged-in shopper typing new details can tick “Save as a billing profile”; convert_cart_to_order/2 takes save_billing_profile: true and creates the profile in the conversion transaction. Ukrainian translations for the new strings.

Changed

  • Shopify sync is off by default and fails closed (#80). Upgrade note: run mix phoenix_kit.update. The chain’s new V3 step writes shop_shopify_enabled = "true" for an install that already uses Shopify and has no such row; a host that skips the update loses the Shopify tab and provider until the toggle is switched on.

Fixed

  • The phoenix_kit_billing floor is now ~> 0.20. Checkout’s billing form needs BillingProfileFields and BillingProfile.fields_changeset/3, which 0.20 is the first release to ship; against 0.13-0.19 the checkout page failed at runtime. A floor test pins them.
  • Hidden billing fields no longer block checkout after a type switch. An invalid company VAT number or overlong individual name was still validated after its field disappeared. Checkout validates only the selected type while preserving the other type’s draft values.
  • Unavailable checkout shipping can be replaced in checkout. When shipping selection is configured for checkout, an unavailable method on mount or a missing/disabled selection at confirmation returns to its picker instead of sending the shopper to a cart with no shipping controls.
  • The transitional shop namespace exports the new APIs. PhoenixKit.Modules.Shop now delegates default_checkout_country/0, children/0, stock_tracking_enabled?/0 and warehouse_status/0.

E-commerce 0.5.20. Install or update: {:phoenix_kit_ecommerce, "~> 0.5"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.