Picture of Dynamic Tier Pricing Powered by Pricing Scripts

Dynamic Tier Pricing Powered by Pricing Scripts

Introduction

Dynamic Tier Pricing allows Infigo to recalculate and display tier prices in real time based on a customer’s product selections.

When a customer changes attributes such as colour, size, or material, the tier pricing shown on the product page updates instantly—without refreshing the page—ensuring pricing is always accurate and transparent.

This feature is powered by pricing scripts, giving you full control over how tier prices are calculated.


What this feature does

Dynamic Tier Pricing enables you to:

  • Display quantity-based tier pricing that updates dynamically

  • Recalculate tier prices when product attributes change

  • Use pricing scripts to return:

    • A single unit price or

    • A full tiered pricing structure

  • Support both:

    • Table-based tier pricing

    • Quantity-dropdown pricing

  • Keep cart and checkout pricing unchanged and accurate


Why this was added

Previously, tier pricing:

  • Was static on the product page

  • Did not react to attribute changes

  • Only reflected product-level tier prices

  • Could differ from the final calculated price

This caused confusion when:

  • Attributes affected pricing

  • CSV-based or scripted pricing was in use

  • Customers saw tier prices that didn’t match their selections

Dynamic Tier Pricing resolves this by ensuring tier prices always reflect the active configuration.


Before you start

Before enabling Dynamic Tier Pricing, ensure:

  • Your storefront displays tier pricing (table or dropdown)

  • Products have tier prices configured

  • Products use a pricing script (generic or custom)

  • Your theme supports:

    • Tier price table or

    • Quantity-based pricing dropdown

  • Admin access to catalog and settings


STEP 1 – Enable Dynamic Tier Pricing

Go to:

Admin → Configuration → Settings → Catalog Settings

Set the following:

  • Enable Dynamic Tier Price Updates → ON

  • Ignore Tier Prices → OFF

Save the settings.

This enables dynamic tier pricing across the storefront.


STEP 2 – Choose how tier prices are displayed

Dynamic tier pricing works with both display types:

Option A: Tier price table

  • Shows tiers horizontally (e.g. 10+, 25+, 50+)

  • Updates automatically when attributes change

Option B: Quantity-based dropdown

  • Shows quantity options with per-unit prices

  • Updates dynamically when attributes change

  • Preserves the selected quantity where possible

This can be edited within the product variant configuration > Tier Pricing area. No additional configuration is required beyond your theme setup.


STEP 3 – Configure your product

Add tier prices

For each product:

  1. Go to Admin → Catalog → Products

  2. Open the product

  3. Go to the Tier Prices tab

  4. Add quantity breaks and prices

These tier quantities act as the base structure that pricing scripts can modify.


STEP 4 – Attach a pricing script

Dynamic tier pricing is driven by pricing scripts.

Option A: GenericPricingScript 

Use this if your pricing is script based.

You can attach this directly to the product via a Pricing Script created in Infigo. 

Script Config Example:

{
    "filePath": "pricing/test-dynamic-tier.csv",
    "priceColumnName": "Price",
    "setupCostColumnName": "Setup",
    "quantityColumnName": "Quantity",
    "useTierPrice": true,
    "skuColumnName": null,
    "debugMode": true,
    "takeIntoAccountBatchRecord": false,
    "defaultPrice": 100
}

 

Option B: CSV File Setup

Use this if your pricing is driven by a CSV file.

You can upload your CSV file into the Global Additional Data section in Infigo. 

Typical use cases:

  • Attribute-based pricing

  • Quantity-based price matrices

  • Setup costs distributed per quantity

The script can:

  • Read CSV rows

  • Match attribute combinations

  • Calculate tier prices dynamically

  • Return fallback pricing when no match exists

Tier prices update automatically when attributes change.

CSV Content Example:

Color, Size, Quantity, Price, Setup
White, Small, 10, 1.00, 50

White, Small, 25, 0.90, 50
White, Small, 50, 0.80, 50
White, Small, 100, 0.70, 50
White, Medium, 10, 1.20, 50
White, Medium, 25, 1.10, 50
White, Medium, 50, 1.00, 50
White, Medium, 100, 0.90, 50
Blue, Small, 10, 2.00, 100
Blue, Small, 25, 1.80, 100
Blue, Small, 50, 1.60, 100
Blue, Small, 100, 1.40, 100
Blue, Medium, 10, 2.40, 100
Blue, Medium, 25, 2.20, 100
Blue, Medium, 50, 2.00, 100
Blue, Medium, 100, 1.80, 100
Red, Small, 10, 3.00, 150
Red, Small, 25, 2.70, 150
Red, Small, 50, 2.40, 150
Red, Small, 100, 2.10, 150

 

Option B: Custom Pricing Script (no CSV)

Use this if pricing is calculated entirely in code.

With custom scripts you can:

  • Apply multipliers

  • Modify database tier prices

  • Create complex pricing logic

// Custom tier pricing script example
var multiplier = 1;
var colorAttr = Item.getAttributeValue("Color");

if (colorAttr === "Blue") {
    multiplier = 2;
} else if (colorAttr === "Red") {
    multiplier = 3;
}

// Check if running in tier price extraction mode
if (Item.IsTierPriceMode) {
    // Loop through database tier prices and apply multiplier
    var tiers = Item.PricingTiers;
    for (var i = 0; i < tiers.length; i++) {
        var tierQty = tiers[i].Quantity;
        var tierPrice = tiers[i].Price * multiplier;
        setTierPrice(tierQty, tierPrice);
    }
}

// Return unit price (required)
return Item.Price * multiplier;

The script can detect when it is running in tier pricing mode and return calculated tier prices for display.


STEP 5 – How dynamic updates work

When a customer changes a product attribute:

  1. The page sends an asynchronous request

  2. Selected attributes and quantities are passed to the pricing script

  3. The script recalculates tier prices

  4. The tier price display updates instantly

  5. The unit price continues to update as normal

This happens without page reloads and without affecting performance.


Important behavior to understand

  • Tier pricing updates are display-only

  • Cart and checkout pricing always uses the actual calculated price

  • Tier prices are informative and reflect:

    • Attribute selection

    • Pricing logic

    • Quantity breaks

  • Products without pricing scripts continue to use static tier pricing


Fallback behavior

If something prevents tier pricing from being calculated dynamically:

  • Tier prices fall back to the database values

  • Customers never see an error

  • Cart and checkout pricing remains correct

Fallbacks occur when:

  • No pricing script is attached

  • The script does not return tier prices

  • The script encounters an error

  • The feature is disabled


Common setup mistakes to avoid

  • Forgetting to enable the feature setting

  • Expecting tier prices to affect cart pricing directly

  • Not attaching a pricing script

  • Missing tier prices on the product

  • Assuming tier prices update on products without scripts


Example scenario

Product: Custom printed flyers
Attributes: Paper type, colour
Tier pricing: 10+, 25+, 50+, 100+

  • Customer selects White paper

    • Tier prices update for White paper

  • Customer switches to Blue paper

    • Tier prices recalculate instantly

  • Customer adds 50 units to cart

    • Cart price uses the actual calculated price for 50 units

Tier pricing always matches what the customer sees and what they pay.


Summary

Dynamic Tier Pricing Powered by Pricing Scripts allows you to:

  • Show accurate tier prices for configurable products

  • Eliminate pricing confusion

  • Support complex pricing models

  • Improve transparency and trust

  • Keep cart and checkout logic unchanged

This feature is ideal for advanced storefronts using attribute-driven or CSV-based pricing.

Incomplete
Alternate Search Terms
WYSIWYG stands for "What You See Is What You Get" which means that the styling choices made in this editor will be reflected on the front end.