Custom pricing on Shopify means the price changes based on what the customer selects or enters, instead of being locked to fixed variants. Add a surcharge once a width goes over 60 inches. Charge one rate for premium fabric and another for standard. Tack on an installation fee only when someone wants it. Shopify variants can’t do any of this. With Apippa Custom Price Calculator, each rule is a single line in your formula, using conditional logic.
This is a walkthrough of how custom, conditional pricing actually works in Apippa, when to reach for a formula versus a lookup table, and the two small mistakes behind most wrong-price problems.
Why Shopify variants can’t do this
Shopify pricing is built around fixed variants. A t-shirt in Small/Medium/Large, each with a set price. That model breaks the moment your price depends on something the customer decides at checkout.
Say you sell cut-to-size acrylic sheets. The price is width times height times a per-square-foot rate, plus a cutting fee if the piece is oversized. There’s no variant for “62 inches wide with a cutting surcharge.” You’d need thousands of variants to cover every size, and even then you couldn’t add a conditional fee.
That’s the gap conditional pricing fills. Instead of pre-building every combination, you write the rule once and let it calculate live.
Start with a condition in the formula
Apippa formulas can branch. The if() function takes a condition, a value when it’s true, and a value when it’s false:
Width * Height / 144 * 4.50 + if(Width > 60, 15, 0)
That charges $4.50 per square foot and adds a $15 cutting fee only when the width passes 60 inches. The /144 converts square inches to square feet.
Want two different rates instead of a surcharge? Drop the “plus” and return the rate itself:
if(Width > 45, 85, 65)
Conditions combine with and(), or(), or &&, and you can nest them:
if(Width > 45 && Height > 45, 120, 0)
The comparisons you can use: > < >= <= == !=. If you're coming from spreadsheets, = works for equals and <> for not-equals too.
Use if() for one or two conditions. Past that it gets hard to read and harder to change later, which is where the next tool comes in.
Which tool fits which rule
Not every conditional rule belongs in a formula. Here's how to pick:
- A fee or rate that changes past one or two thresholds →
if()in the formula - Three or more price bands → Data Lookup in range mode, or ranges on a Number input
- A different rate per selected option → Dropdown, Radio, or Image Selector with a value per option
- An optional add-on fee → Checkbox
- A rate that depends on two inputs at once → Data Lookup
The rule of thumb: one or two conditions, use a formula. A table of rates, use a lookup.
Recipe: a different rate per option
This is the most common conditional pricing need, and it doesn't use if() at all.
Say premium fabric costs $4.00 per square foot and standard costs $2.50. Add a Dropdown (or Radio, or Image Selector) and give each option its own value: Standard = 2.50, Premium = 4.00. Mark it for use in the formula as Rate:
Width * Height / 144 * Rate
Because the selected option is the number, there's nothing to maintain when a price changes. You just edit the option's value. No formula rewrite.
One important rule here: never try to read a material name from a text field and price on it. Price on the selected value, never on free text. This is the fix for the recurring "can I price based on what they type?" question. The answer is to make it a selectable option with a number attached, not typed text.
Recipe: an optional add-on fee
"Add $100 for installation if the customer wants it."
Use a Checkbox. Unchecked = 0, checked = 100, labelled Installation:
shopify_product_price + Installation
Note shopify_product_price there. That's the reserved variable for the product's base price in Shopify, so you can build on top of your existing price instead of rebuilding it.
Recipe: several price bands
"1 to 10 units at $9, 11 to 50 at $7, 51 and up at $5."
This is exactly where if() stops being the right answer. Three nested conditions are hard to read and worse to edit six months from now. Use a Data Lookup in range mode instead: one row per band, quantity as the input, and reference the lookup by name in your formula.
Changing a price then means editing a cell, not rewriting a condition. The same logic applies to any rate that depends on two inputs at once, like width against height. A lookup holds the whole grid; a formula would need a condition for every cell.
Showing and hiding fields based on selections
There's a second kind of "conditional" worth knowing: Conditional Display. This shows or hides an element based on another input's value. If someone picks "Framed" from a dropdown, you can reveal a frame-color selector that stays hidden otherwise.
To set it up: add your element, turn on Conditional Display, choose which element controls it, and set which value triggers it to appear.
One thing to watch: Conditional Display changes what's visible, not what a rate is. The price still comes from your formula or lookup. And if a hidden element is part of the formula, set its "value when not displayed" to 0 so the price doesn't jump around while the page loads.
What the formula engine supports
Before you write anything complex, know the boundaries.
Supported operators: + - * / and parentheses, plus the comparisons listed above.
Supported functions: ceil(), ceiling(), floor(), sqrt(), if(), max(), min(), and(), or(). You can nest them.
Not supported: pow(), round(), and abs() are genuinely absent, and ^ for exponentiation isn't accepted.
Rounding money: there's no round(). Instead, set Formula Output Decimals to 2 in the calculator's settings for currency.
Base price: the reserved variable is shopify_product_price. There's no shopify_price.
The two mistakes behind most wrong-price tickets
Almost every wrong-price problem comes down to one of these two.
A label that doesn't match. width and Width are different things to the formula engine. Element names must match their labels exactly, including capitals and spaces. If a formula won't save, check the element names character by character before anything else. Copy-pasting labels can also carry invisible characters the parser rejects, so if something looks right but won't save, retype it by hand.
Pricing on free text. A Text Input returns text, and formulas return numbers. If a choice affects the price, it has to be a Dropdown, Radio, Image Selector, or Checkbox with a value attached, not a text box.
Get those two right and the vast majority of conditional pricing issues never happen.
Prefer to describe it than build it?
If writing formulas isn't your thing, Apippa's built-in AI assistant Calcy builds the calculator from a plain-English description. Tell it "charge $4.50 per square foot and add $15 when width is over 60 inches" and it writes the elements and formula for you. You can always open it up and tweak the conditions by hand afterward.
FAQ
Can I charge a surcharge only above a certain size? Yes. Use if() in your formula, like if(Width > 60, 15, 0), to add a fee only when the condition is met. It returns 0 the rest of the time.
How do I charge different prices for different material options? Add a Dropdown, Radio, or Image Selector and give each option a numeric value. Reference that value in your formula. Editing a price later just means changing the option's value.
What's the difference between conditional pricing and conditional display? Conditional pricing changes the price based on input using formulas and lookups. Conditional display changes which fields are visible. They're separate tools, and showing or hiding a field doesn't change a rate on its own.
When should I use a Data Lookup instead of an if() formula? Once you have three or more price bands, or a rate that depends on two inputs at once. Nested if() calls become hard to read and edit, while a lookup table holds them as rows you can change in a cell.
Why won't my formula save? The most common causes are an unsupported function like round(), a Math. prefix, or an element label that doesn't match its element exactly. Retype element names by hand if a copy-paste might have added invisible characters.