Skip to content

E-commerce 0.1.2: Tax rates come from Billing

E-commerce 0.1.2 takes the shop’s tax rate from the Billing module, so tax is set in one place. The admin lists get the standard PhoenixKit table layout, and deleting a single category now needs an admin.

Tax from Billing

Carts and the shop configuration now ask the Billing module whether tax is on and at what rate. Without Billing loaded, they read Billing’s own settings for tax on or off and for the default rate. The shop’s separate shop_tax_enabled and shop_tax_rate settings are no longer read.

Admin pages

The carts, categories, products, shipping methods and import configuration lists use PhoenixKit’s standard tables with a row menu for actions. The admin pages now get their layout from PhoenixKit core instead of wrapping it themselves; the storefront keeps its own. Shipping methods show weight limits with one decimal, such as 1.5 kg, instead of rounding down to whole kilograms.

Deleting one category now checks that the user is an admin, as the bulk actions already did.

Upgrading

No migration. Check the tax settings before updating a live shop. The old shop settings had tax on at 20% unless changed. Now the shop charges whatever Billing is set to, and without Billing installed the fallback is tax off at 0%. Set the tax rate in Billing first if your shop charges tax. Code that still uses the old PhoenixKit.Modules.Shop names keeps working through new forwarding modules.

Full release notes: E-commerce 0.1.2

0.1.2 · 30 March 2026

Added

  • Compat alias modules (lib/phoenix_kit_ecommerce/compat/) bridging old PhoenixKit.Modules.Shop.* namespace to PhoenixKitEcommerce.* for backward compatibility
  • Billing module as single source of truth for tax rates with Settings fallback

Changed

  • Remove explicit LayoutWrapper.app_layout from 14 admin LiveViews (core now auto-applies admin layout; kept in shop_layouts.ex for public storefront)
  • Convert 5 admin list pages (carts, categories, products, shipping methods, import configs) to table_default + table_row_menu components
  • Remove 65 duplicate files from old lib/phoenix_kit/modules/shop/ namespace and 2 duplicate mix tasks

Fixed

  • Add admin authorization check (Scope.admin?/1) to individual category delete, matching bulk operations
  • Replace raw <tr><td> empty-state rows with proper table_default components in shipping methods and import configs
  • Fix weight formatting in shipping methods to use Float.round/2 for precision consistency with carts

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