On this page
  1. Install
  2. How the allowance is evaluated
  3. Mark a budget as one-time
  4. Grant an allowance
  5. Failed and abandoned checkouts

One-Time Budget

mageb2b/sublogin-budget-one-time adds a temporary allowance intended for the sublogin's next successful order. It requires the Budget add-on, not Order Approval.

Install

composer require mageb2b/sublogin-budget-one-time
php bin/magento module:enable MageB2B_SubloginBudgetOneTime
php bin/magento setup:upgrade

How the allowance is evaluated

When more than one active one-time budget exists, the latest active record is used. Its amount becomes the effective per-order allowance and overrides the normal periodic budget calculation for that checkout.

After successful order placement, active one-time budgets for that sublogin are deactivated. The same cleanup applies to multishipping order placement.

The optional popup setting controls the explanatory message only. It does not turn enforcement on or off.

Mark a budget as one-time

A budget becomes a one-time allowance through the One-Time Budget (Yes/No) field rather than a separate record type:

  • In Admin, the field appears on the sublogin budget form. Its notice states that the budget is used once, deactivates after an order and overrides the sublogin's other budget types while active.
  • In the storefront, the budget create/edit form offers the same Yes/No select, and the budget list marks one-time records.

The flag is also available as the is_one_time extension attribute on the Sublogin Budget API contract.

Grant an allowance

  1. Confirm the buyer's normal Budget configuration and calculation basis.
  2. Create one active one-time budget with the approved amount.
  3. Tell the buyer the allowance is for the next successful order.
  4. Complete a staging checkout below the amount.
  5. Confirm the order succeeds and the one-time record becomes inactive.
  6. Start another cart and confirm normal budget rules apply again.

Avoid creating several active one-time records for the same person. Although the latest record wins, overlapping approvals are difficult to explain and audit.

Failed and abandoned checkouts

The allowance is consumed after successful order placement, not merely by opening checkout. If a payment integration creates an order before later failing externally, review the resulting Magento order and allowance state as part of reconciliation.

Related: Budget Management and Order Approval.