Product Card & Product Page Display

Re-turn's Producer Guidance recommends showing the deposit on every product card and product page, alongside the product price:

A) Single item                  B) Multipack
Spring Water (500 ml)           Spring Water 6 Pack (500 ml)
€0.80 (€1.60/litre)             €4.00 (€1.33/litre)
+ 15c Deposit                   + 90c Deposit

This plugin makes that easy.

How it works

For a 6-pack to show "+ 90c Deposit" (not "+ 15c Deposit"), the plugin needs to know how many deposit-bearing containers sit inside one unit of the product. That's the job of the Containers Per Unit (Deposit) field.

VariantDeposit typeContainers per unitDisplay
Spring Water 500 ml Small Container (€0.15) 1 + 15c Deposit
Spring Water 6-pack 500 ml Small Container (€0.15) 6 + 90c Deposit
Spring Water 2 L Large Container (€0.25) 1 + 25c Deposit
Tray of 24 cans 330 ml Small Container (€0.15) 24 + €3.60 Deposit

The field defaults to 1 if it's missing - existing products without it keep working exactly as before.

Setup

  1. Commerce → System Settings → Product Types → [Your type] → Variants tab.
  2. Drag Containers Per Unit (Deposit) into the layout, next to your existing Container Deposit Type field.
  3. On each multipack variant, set the count (1 for singles, 6 for 6-packs, etc.).

Rendering on product cards

The plugin exposes a Twig helper that returns the formatted display string:

{{ craft.containerDeposits.displayFor(variant) }}
{# → "+ 15c Deposit" or "+ 90c Deposit" or "" if the variant has no deposit #}

Drop-in partial

For the price+deposit pair shown in the Re-turn image, use the partial:

{% include 'store/_partials/product-price-deposit' with {
    purchasable: variant,
} only %}

With a custom price label (e.g. with a per-litre suffix):

{% set perLitre = (variant.price / variant.litres)|currency(cart.currency) ~ '/litre' %}
{% include 'store/_partials/product-price-deposit' with {
    purchasable: variant,
    priceLabel: variant.priceAsCurrency ~ ' (' ~ perLitre ~ ')',
} only %}

Twig helpers reference

CallReturns
craft.containerDeposits.displayFor(purchasable) Formatted string e.g. "+ 90c Deposit". Empty string if no deposit.
craft.containerDeposits.unitDepositFor(purchasable) Numeric per-unit deposit total e.g. 0.90.
craft.containerDeposits.containersFor(purchasable) Number of containers per unit, defaulting to 1.
craft.containerDeposits.typeFor(purchasable) The assigned DepositType model, or null.
craft.containerDeposits.formatAmount(0.15) "15c" (Re-turn's preferred cents style under €1).
craft.containerDeposits.formatAmount(3.60) "€3.60" (currency style at €1+).

Cart behaviour with multipacks

The cart scales the deposit qty by the container count automatically. Adding 2× of a 6-pack to the cart gives you:

Spring Water 6-pack       × 2     €8.00
Small Container Deposit  × 12     €1.80

That's 2 packs × 6 bottles each = 12 deposits.