Free price

A product sold at a free price lets the customer type the amount paid. You set a minimum and a suggested amount: the field is prefilled with the suggested amount, and any amount under the minimum is refused. This is how a non-profit offering a "pay what you can" service, a donation or a contribution to the costs usually works.

Turn on the free price of a product

Open the product or service card in Dolibarr, tab OnePageBasket, then fill in:

Field Effect
Free price The customer types the amount.
Free price: minimum amount Lowest amount accepted. Empty: no minimum.
Free price: suggested amount Amount offered to the customer. Empty: the selling price of the product.

Amounts are in the price base of the product: excluding tax when its selling price is typed excluding tax, including tax when it is typed including tax. An amount including tax is exactly what the customer pays.

A suggested amount lower than the minimum is raised to the minimum.

What the customer sees

On the product page, the add-to-basket form (or the direct order form when the basket is turned off) shows the field Your amount, prefilled, with the suggested amount and the minimum.

  • The customer may type 12, 12,50 or 12.50. Two decimals at most.
  • A refused amount (under the minimum, or not an amount) brings the customer back to the product page with the reason, and the amount typed is offered again.
  • Each amount chosen is a basket line of its own, quantity 1: the same product added twice with two amounts gives two lines.
  • The quick add buttons of the catalogue, of the suggestions or of the favorites never put a free price product in the basket at the catalogue price: they send the customer to the product page to choose the amount.

The amount is checked again at the order: if you raised the minimum in the meantime, the line is removed from the basket with a message, and nothing is ordered.

Subscriptions

A recurring invoice template sold by the shop may hold a line of a free price product. The subscription page then asks, under Your choices, the amount per period of that line.

The amount chosen becomes the price of the line:

  • of the order and of the first invoice;
  • of the recurring invoice created for the customer at the payment;
  • so of every invoice this subscription will generate.

The discount of the template line, if any, does not apply to an amount chosen by the customer.

Contract templates keep the prices of the contract: the free price does not apply to them.

Advanced setting

The constant ONEPAGEBASKET_FREE_PRICE_MAX (default 100000) sets the highest amount accepted, a guard against typing mistakes.

See also