How pricing works
Optivo changes what a customer pays at checkout, using a Shopify Function. It does not change the product’s price, and it does not create a variant to hold a different price.
Two numbers, one source of truth
Section titled “Two numbers, one source of truth”There are two places a price appears:
- The preview on the product page. Calculated in the browser as the customer fills in the fields. This is a convenience so nobody is surprised at the cart.
- The amount actually charged. Calculated by a Shopify Function at checkout, from the configuration you published.
The second is the only one that decides what a customer pays. The preview cannot be tampered with into a discount, because nothing the browser sends is trusted for pricing.
Publishing is what makes pricing real
Section titled “Publishing is what makes pricing real”The function reads the configuration that was sent to Shopify when you published. Editing a draft changes nothing about what customers are charged. See Drafts and publishing.
The five rules
Section titled “The five rules”| Rule | Adds | Available on |
|---|---|---|
| Flat fee | A fixed amount | Every option type |
| Percentage of product price | A share of the product’s own price | Choice options |
| Per character typed | An amount for each character entered | Text options |
| Formula | The result of an arithmetic expression | Text and numeric options |
| Quantity tiers | An amount that changes with line quantity | Choice and numeric options |
Which rules an option offers depends on its type — see Choosing a type.
Add-ons are per unit
Section titled “Add-ons are per unit”An option surcharge applies to each unit on the line, not once per line. A £5 gift wrap on a quantity of 3 adds £15.
The price preview says this explicitly once quantity is above one, showing the per-unit total and the line total, so there is no ambiguity before the customer reaches the cart.
Rounding
Section titled “Rounding”All arithmetic is done in whole fractions of a penny and rounded half-up at the end — 0.5 rounds away from zero. The same rounding runs in the preview and at checkout, which is what keeps them equal.
What is never affected
Section titled “What is never affected”- Your product’s own price. Untouched.
- Your variants. None are created or modified.
- Discounts and taxes. These apply to the adjusted line as Shopify normally handles them.
Hidden options never charge
Section titled “Hidden options never charge”If conditional logic hides an option, its answer is not submitted and it cannot contribute a charge. A customer is never billed for a field they could not see.