Skip to content

E-commerce 0.8.0: Ready for PhoenixKit 3 and stricter admin page access

E-commerce 0.8.0 gets the PhoenixKit shop ready for core 3.x: the module now builds all of its own tables, and each admin page checks the shop permission it needs instead of only the base shop key.

Works with PhoenixKit 3

Core 3.0 stops creating the module tables, so the shop’s own migration chain now has to build every one of them. A new migration, V6, adds the three cart columns that core’s own migrations used to add: the cart’s base currency and exchange rate, and the base unit price on each cart line. On an existing shop the columns are already there and V6 changes nothing.

The module also tells core which of its 12 tables to expect, so mix phoenix_kit.repair and mix phoenix_kit.doctor check and repair the shop tables from the module’s own definition. It also tells core’s orphan-file check which product and category rows point at a stored file. What counts as an orphan file does not change.

Each admin page checks its own permission

The shop already had sub-permissions such as Manage catalog, Manage shop settings and Run imports. Most admin pages now check them when they open. Products, categories, a product’s page and form and the test shop need Manage catalog. Settings, option settings and shipping methods need Manage shop settings. CSV imports, import configurations and Shopify sync need Run imports. A user with only the base shop permission who opens one of these pages is sent back to the shop dashboard with “You don’t have permission to do that”.

The AI translation window on the product form is now checked too: without Manage catalog, its actions are refused, including starting a translation.

Upgrading

E-commerce 0.8 needs PhoenixKit core 2.65.0 or later (and accepts core 3.x), Billing 0.24 or later, and, if you use them, AI 0.27 and Warehouse 0.7 or later. Run mix phoenix_kit.update to apply migration V6. Staff who could open the catalog, settings or import pages with only the base shop permission now need the matching sub-permission: check your roles before you deploy.

Full release notes: E-commerce 0.8.0

0.8.0 · 27 October 2026

Added

  • The module supplies the manifest of its 12 tables (expected_schema/0, PhoenixKitEcommerce.ExpectedSchema), so mix phoenix_kit.repair and mix phoenix_kit.doctor check and repair them again, now from the module’s own chain instead of core’s manifest. Generated from PhoenixKitEcommerce.Migrations by core’s dev_docs/squash/generate_module_manifest.exs, never edited by hand. Core uses it from the first release after 2.64.1; before that nothing reads it. Repair is additive (it creates what is missing and reports the rest) and checks the tables only while the database is at the chain’s current version. No migration.
  • The module now tells core’s orphan-file check which of its rows point at a stored file (file_references/0, in FileReferences): phoenix_kit_shop_products, phoenix_kit_shop_categories. The SQL moved here verbatim from core’s PhoenixKit.Modules.Storage; a test compares it with core’s own copy. Core reads the callback from the first release after 2.64.1; before that, core’s own list stays in force. No migration, no change in what counts as an orphan.

Changed

  • Core pin widened to >= 2.65.0 and < 4.0.0: works with core 3.x (core 3.0 stops creating the module tables; this module’s own chain builds its tables). The floor is the first core with the file_references/0 and expected_schema/0 callbacks, which now carry @impl PhoenixKit.Module.

  • Migration V6: adds phoenix_kit_shop_carts.base_currency / .exchange_rate and phoenix_kit_shop_cart_items.base_unit_price (ADD COLUMN IF NOT EXISTS), the columns core’s V186 added, so the module’s chain builds every shop table without core’s. A no-op on existing installs. A builds-alone test checks it against core’s chain (runs once the module resolves the next core release).


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