Skip to content

Multi-Site & Multi-Store

The plugin supports Craft's multi-site setup and Commerce 5's multi-store setup out of the box.

How it works

Deposit types are installation-wide

The list of deposit types (Small Container €0.15, Large Container €0.25, …) is shared across every site and every store in the installation. This matches how Re-turn actually operates: one scheme, one set of tiers, applied to whichever products the merchant flags.

If you need different deposit schemes per region (e.g. Re-turn for Ireland alongside DRS for another country), create separate deposit types in the shared list and assign each product to whichever tier matches the market.

Deposit purchasables propagate to every site

When you save a deposit type, the plugin creates (or updates) a hidden DepositPurchasable element. It is propagated to every enabled site automatically via getSupportedSites(), so the cart sync can resolve the deposit purchasable regardless of which store/site the shopper is on.

If you add a new site after creating deposit types, the plugin re-propagates all existing deposit purchasables to that site automatically. No manual intervention required.

Tax category is shared

Commerce 5 stores tax categories at the installation level (not per store), so the Bottle Deposit (No VAT) category created on install is automatically available to every store.

Order site resolution

When a shopper adds a product to their cart, the order is associated with the current site. The cart sync looks up the deposit purchasable in that site's context, so:

  • Cart sync resolves the correct purchasable for the order's store
  • Tax category lookup returns the same VAT-exempt category regardless of store
  • Currency formatting respects the active store's currency

What about per-store deposit values?

Deposit amounts are stored as a single decimal value (e.g. 0.15). For multi-currency deployments this is a limitation worth knowing:

  • Ireland-only stores (the typical Re-turn use case) - no issue. EUR is the store currency.
  • Multi-currency stores using Commerce's payment currency conversion - the deposit displays at face value in the store's currency. €0.15 will read as "$0.15" in a USD store. Use payment currency conversion in Commerce to convert at checkout if needed.
  • Truly per-currency deposit amounts - not supported. Create separate deposit types per region/currency if this matters.

What happens if I delete a site?

Craft cleans up the elements_sites rows for the deleted site. The plugin's deposit purchasable elements stay on the remaining sites and continue to work. No cleanup needed.