Skip to content

Money & price

The money field pairs a currency label with a right-aligned, tabular-numbered input. Commerce uses it for every price, discount, and shipping amount. Values are stored as decimals in the store’s currency.

Minimum order value for this discount.

USD $
{{ forms.moneyField({
    label: "Purchase Total"|t("commerce"),
    instructions: "Minimum order value for this discount."|t("commerce"),
    id: "purchaseTotal",
    name: "purchaseTotal",
    value: discount.purchaseTotal|number,
    currencyLabel: currency,   {# e.g. "USD $" #}
    decimals: decimals,
    showCurrency: true,
    showClear: false,
    errors: discount.getErrors("purchaseTotal"),
}) }}