Skip to main content

Customer overrides

The default deposit (set in Payments configuration) applies to every customer. Per customer, you can override:

  • The deposit type (percentage or fixed amount, or always full pay)
  • The deposit amount

Useful for:

  • Wholesale accounts — always pay 100% upfront, no deposit option.
  • VIP retail customers — 0% deposit (full credit until shipment).
  • B2B / dealer pricing — bespoke deposit % per account.

Setup

The customer attributes are added by Setup/Patch/Data/CreateCustomerAttributes.php on setup:upgrade.

AttributeCodeType
Pre-order deposit overridepreorder_deposit_overrideYes/No (master switch for this customer)
Pre-order deposit typepreorder_deposit_typeSelect: Percent / Fixed / Full
Pre-order deposit amountpreorder_deposit_amountNumber — only used when type is Percent or Fixed

All three are visible in the admin Customer edit screen under the Account Information tab.

How resolution works

Model/Service/PreorderEligibility.php evaluates in this order:

  1. Customer-level override — if preorder_deposit_override = Yes, use the customer's preorder_deposit_type + preorder_deposit_amount.
  2. Per-product override — if the product's preorder_deposit_type ≠ inherit, use the product's value.
  3. Global config — fall back to byte8_preorder/payment/*.

The first match wins. So a wholesale customer's "always full pay" override wins over a per-product 25% deposit, which wins over the global 25% default.

Worked examples

Wholesale account always pays 100%

  • Customer entity: preorder_deposit_override = Yes, preorder_deposit_type = Full.
  • Result: every pre-order this customer places charges 100% at checkout, no balance carried.

VIP customer pays 0% deposit

  • Customer entity: preorder_deposit_override = Yes, preorder_deposit_type = Percent, preorder_deposit_amount = 0.
  • Result: pre-orders book with €0 captured, full balance owed at vault capture time. Vault token still required.

B2B dealer pays €50 flat per item

  • Customer entity: preorder_deposit_override = Yes, preorder_deposit_type = Fixed, preorder_deposit_amount = 50.00.
  • Result: regardless of product price, deposit is €50 per item.

Bulk applying via customer group

Magento's standard customer_attribute import covers it — export the customer entity, set the three columns, re-import. For automation, write a small consumer that reads a webhook from your ERP and updates the attributes.

There's no built-in "customer group → deposit %" mapping — the override lives on the customer entity directly. If you genuinely need a group-level rule, write a plugin on PreorderEligibility::resolveDepositForCustomer to read the group ID and apply your own logic.

Customer-side visibility

By design, the customer doesn't see their override settings on the storefront. The PDP simply shows the resolved deposit. Wholesale customers see their 100% upfront, VIP sees 0% — just rendered as different numbers on the same UI.