🚀 Pricing Scripts Tips & Tricks 🚀

Picture of 🚀 Pricing Scripts Tips & Tricks 🚀
Read our handy storefront styling tips and tricks!

Understanding Infigo’s Pricing Methods

 

This guide introduces the three primary pricing methods available in Infigo:

  1. Basic (Simple) Pricing

  2. Tiered Pricing

  3. Pricing Scripts

You’ll learn how each method works, where to configure it, and which approach best suits your product catalogue or pricing strategy.


Key settings

Setting Description
Price / Old Price / Special Price The core fields used for basic pricing on a per-product basis.
Tier Pricing Records Defines quantity-based discounts, with quantity and price fields per tier.
Customer Role Optional setting for tier pricing — allows different pricing per user group.
Attach a Price Script Enables advanced dynamic pricing controlled by CSV files or custom logic.
Global Additional Data Storage area for CSVs used in pricing scripts.

Use cases

  • Basic Pricing:
    Best for simple, static products that always sell at a fixed price.
    Example: a one-size product with no options or quantity-based discounts.

  • Tiered Pricing:
    Perfect for volume discounts or trade pricing models.
    Example: "Buy 100 or more, save 20% per unit."

  • Pricing Scripts (Generic or Custom):
    Used for complex or data-driven pricing — when prices depend on combinations of attributes (size, material, quantity, etc.).
    Example: pricing that varies based on paper type and quantity.


Step-by-step implementation

Step 1 – Basic Pricing

  1. Navigate to Admin → Catalog → Products → Product Variants.

  2. On the Information tab, locate the pricing section.

  3. Enter:

    • Price – the default per-unit cost.

    • Old Price – optional (used to show “was/now” pricing).

    • Special Price – optional (temporary discounted rate).

  4. Optionally, set Start and End Dates for special prices.

  5. Save your product.

đź’ˇ Basic pricing does not change based on quantity or attributes — it’s a fixed per-unit model.


Step 2 – Tiered Pricing

  1. Go to Admin → Catalog → Products → Product Variants → Tier Prices.

  2. Click Add a Tier Price Record.

  3. For each tier, enter:

    • Quantity (the minimum quantity for the discount)

    • Price (the unit or total price, depending on your setup)

    • Optional: Customer Role to apply different prices to specific user groups.

  4. Choose how the price is displayed:

    • Per Unit or Total Order Price (toggle via checkbox).

  5. Save your configuration.

đź’ˇ Tiered pricing automatically adjusts prices as the customer increases the quantity in the storefront.


Step 3 – Tiered Pricing Methods

There are several ways tiered pricing can behave:

Method Description
Normal (Fixed Per Tier) Entire order uses one price per unit based on the tier reached.
Quantity-Based Pricing Restricts buyers to specific tier quantities (e.g. 100, 500, 1000).
Spread Pricing Distributes price savings across tiers (mixed pricing).
Interpolated Pricing Smooths pricing between tiers based on an equation — ideal for large ranges.

⚙️ “Interpolated” pricing creates a continuous curve between quantity tiers rather than fixed steps, providing smooth per-unit adjustments.


Step 4 – Pricing Scripts

Pricing Scripts provide maximum flexibility for dynamic or attribute-based pricing.
They let you define complex rules that consider multiple inputs such as size, material, and quantity.

Infigo offers:

  • Generic Pricing Script: Included by default, suitable for most use cases.

  • Custom Pricing Scripts: Tailored to unique business logic, available via Infigo’s Professional Services team.

To configure:

  1. In Product Variant → Information, locate Attach a Price Script.

  2. Select Generic Pricing Script.

  3. In the configuration box, specify which CSV file to use (via the filePath key).

  4. Upload your pricing CSV under Global Additional Data and reference it in the script.

Example configuration:

 
{ "filePath": "pricingdata.csv", "useTierPrice": true }

Step 5 – Advanced Pricing Options

In addition to these main methods, Infigo supports:

  • Sliding cost adjustments: Adjust prices based on material weight, size, or other product attributes.

  • Customer-specific pricing: Apply pricing per role, customer, or group.

  • Delivery cost add-ons: Add delivery surcharges per product.

  • Purchase restrictions: Disable purchase or hide pricing altogether for specific roles.


Tips & best practice

  • Start simple: Begin with basic pricing, then layer in tier or script-based logic as needed.

  • Be consistent: Use clear naming conventions for CSV files and attributes when configuring pricing scripts.

  • Validate tiers carefully: Ensure quantity thresholds don’t overlap or leave gaps.

  • Leverage Test Mode: Test each pricing configuration within Admin before publishing.

  • Centralize data: If using pricing scripts, store CSVs in one master folder for easy updates.

  • Document your logic: Keep a shared record of pricing rules for internal consistency.

Saving Time with the Generic Pricing Script

 

This guide introduces the Generic Pricing Script, one of the most flexible and time-saving tools for managing product pricing in Infigo.
You’ll learn what it is, how it works, and why it can drastically reduce manual effort when managing multiple products that share the same pricing logic or structure.


Key settings

Setting Description
Pricing Script Type Choose Generic Pricing Script from the dropdown in the Product Variant’s pricing script section.
CSV File Contains all pricing data (attributes, quantity tiers, and prices). Uploaded via Global Additional Data.
Attributes Product attributes (e.g., size, material, color) that drive pricing combinations.
filePath The configuration entry in the Generic Pricing Script that points to the uploaded CSV file.
Global Additional Data The file storage area where your CSVs are uploaded and managed for pricing scripts.

Use cases

  • Consistent pricing across multiple products: Use the same CSV and configuration on many products to save setup time.

  • Easy bulk updates: Edit a single CSV to update pricing for every product that references it.

  • Tiered or complex pricing models: Handle multi-attribute or quantity-based discounts without manual configuration.

  • Reduced maintenance: Centralised pricing logic eliminates repetitive changes in individual product settings.


Step-by-step implementation

Step 1 – Understand the concept

The Generic Pricing Script uses a CSV file as a pricing grid.
Each row in the CSV represents a unique combination of attributes (and optionally quantities) and assigns a specific price.

When a customer selects a matching configuration in the storefront, the system looks up that combination in the CSV and returns the correct price instantly.


Step 2 – Prepare your CSV

  1. In Excel or another spreadsheet tool, create your pricing grid.
    Example:

    Attribute A Attribute B Quantity Price
    1 1 1 2.50
    1 1 100 1.90
    1 2 100 1.60
  2. The CSV can include as many columns and rows as needed — even thousands for large product sets.

  3. Save the file as Comma Delimited CSV (.csv).

đź’ˇ The more products share the same pricing logic, the more valuable this approach becomes — a single CSV can serve them all.


Step 3 – Upload your CSV

  1. Go to Admin → Global Additional Data.

  2. Upload your CSV file into this area.

  3. If necessary, rename it using the gear ⚙️ icon.

  4. Take note of the exact filename — you’ll reference it in the pricing script configuration.


Step 4 – Configure the product

  1. Open the relevant product in Admin → Catalog → Products → Product Variants.

  2. Under Attach a Price Script, select Generic Pricing Script.

  3. In the configuration box, enter:

     
    { "filePath": "pricingdata.csv" }
  4. Save the configuration.

⚠️ Only include lines that override the defaults shown in the blue configuration box.
Avoid trailing commas — this is a common cause of script errors.


Step 5 – Test the setup

  1. Go to Test Mode in the Product Variant admin area.

  2. Ensure default attribute values exist so the test can return a valid price.

  3. Check the results displayed in the debug area to confirm correct CSV data retrieval.

  4. On the storefront, switch attribute selections or adjust quantity to verify dynamic pricing updates.


Step 6 – Reuse and update efficiently

  • The biggest advantage of the Generic Pricing Script is reusability.

  • To apply the same pricing logic to other products:

    1. Attach the Generic Pricing Script to each product.

    2. Point them all to the same CSV using the same filePath.

  • To update pricing, simply re-upload an updated version of the CSV — all linked products will update automatically.


Tips & best practice

  • Maintain one “master” CSV for shared pricing logic — this ensures consistency and reduces errors.

  • Always name your columns clearly and keep attribute names identical to those in the product setup.

  • Use tier pricing in your CSV to create price breaks by quantity.

  • Store a backup of older CSVs before overwriting — this makes rollback easy.

  • Keep the file size manageable (split into multiple CSVs if needed for large datasets).

  • Use debugMode temporarily to confirm that the script is reading from the correct CSV row.

Getting Started with the Generic Pricing Script

 

This guide covers the basics of using the Generic Pricing Script — one of the most versatile tools in Infigo for controlling product pricing.
You’ll learn how to attach the pricing script to a product, link it to a CSV pricing file, and configure attributes so that pricing updates dynamically based on user selections.


Key settings

Setting Description
Pricing Script Defines how pricing is calculated for a product. Choose “Generic Pricing Script” from the dropdown in Product Variant settings.
CSV File Stores the pricing data used by the script (uploaded to Global Additional Data).
Attributes (e.g., A and B) Product options that determine pricing combinations.
File Path The reference within the pricing script configuration that points to the uploaded CSV file.
Default Price The fallback price (e.g., £10,000) displayed if no matching attribute combination is found in the CSV.

Use cases

  • Flexible pricing: Control pricing dynamically based on multiple attribute combinations.

  • Simplified management: Use a single reusable script across many products.

  • Bulk or matrix pricing: Perfect for products with tiered or multi-attribute pricing logic.

  • Training or testing: Ideal for learning Infigo’s pricing structure before building complex scripts.


Step-by-step implementation

Step 1 – Create or select your product

  1. Go to Admin → Catalog → Products.

  2. Create a new product or edit an existing one.

  3. Navigate to the Product Variant section and click Edit.


Step 2 – Attach the Generic Pricing Script

  1. In the Information tab, scroll to Attach a Price Script.

  2. From the dropdown, select Generic Pricing Script.

  3. Save the product — this will reveal additional configuration options below the script selection.


Step 3 – Prepare and upload your CSV

  1. In Excel or another spreadsheet tool, create a CSV file with:

    • One column per product attribute (e.g., A, B)

    • A final column for the Price value.
      Example:
      | A | B | Price |
      |---|---|-------|
      | 1 | 1 | 15.00 |
      | 1 | 2 | 17.00 |
      | 2 | 1 | 20.00 |

    • Include a default fallback price for unmatched selections (e.g., £10,000).

  2. Save it as Comma Delimited CSV (.csv).

  3. Go to Admin → Global Additional Data and upload the file.

  4. Rename it (if needed) using the gear icon beside the filename.


Step 4 – Link the CSV in your script configuration

  1. Return to your product’s Product Variant configuration.

  2. In the script configuration box, add the filePath reference, for example:

     
    { "filePath": "mypricing.csv" }
  3. Ensure the filename matches exactly (including the .csv extension).

  4. Remove the trailing comma if this is the last line in the configuration — syntax errors here will prevent the script from running.

  5. Save the product.


Step 5 – Add your attributes

  1. Still in the Product Variant section, go to Attributes.

  2. Add the attributes used in your CSV (e.g., “A” and “B”).

  3. Ensure the attribute names match the CSV column headers exactly.

  4. Save your product again.


Step 6 – Test your setup

  1. View the product on your storefront.

  2. Initially, you may see the default price (e.g., £10,000) — this appears until valid attribute combinations are selected.

  3. As you choose different attribute values, the price should update dynamically according to your CSV data.

  4. If you see an error or the default price, check:

    • Attribute names match CSV headers.

    • CSV file is correctly uploaded and referenced.

    • No syntax issues (e.g., trailing commas) in the configuration.


Tips & best practice

  • Use simple column headers in your CSV that match your attribute names exactly (case-sensitive).

  • Keep your CSVs lightweight — remove blank rows or extra commas.

  • Always double-check your filePath matches your uploaded filename.

  • Remember: the last line of your configuration should not have a trailing comma.

  • Use the default price (e.g., £10,000) to flag configuration issues during setup.

  • For more advanced pricing (multiple CSVs or split files), see the Multi-Part CSV Pricing tutorial.

How to Optimise Page Loading Speed When Using Multiple Pricing Scripts

1. Overview

This article explains how to optimize pricing script performance for products displayed on homepage, category, and search result pages in your Infigo storefront. If your storefront is experiencing slow load times due to pricing calculations, this guide will help you implement a caching mechanism to improve performance.

For additional information and detailed tutorials, the Infigo Academy offers extensive resources on a wide variety of topics. Visit the Infigo Academy to search and browse our content.


2. Contents

  1. Overview
  2. Contents
  3. Key Points and Takeaways
  4. Key Settings
  5. Scenario-Based Guide
    • Scenario 1: Addressing Slow Page Load Times Due to Pricing Scripts
  6. FAQs
  7. Alternate Search Terms

3. Key Points and Takeaways

  • Introducing a caching mechanism improves load times by storing default product prices in the database.
  • A new catalogue setting, "Use precalculated price on Product Teaser," controls the caching functionality.
  • Cached prices are automatically updated when product-related data (e.g., pricing scripts, product groups) change.
  • When caching is disabled, prices revert to on-the-fly calculations, ensuring real-time accuracy.

4. Key Settings

Setting Name: Use precalculated price on Product Teaser

  • Path: Admin > Configuration > Settings > Catalogue Settings > Use Precalculated Price on Product Teaser
  • Explanation: Enables caching of product prices for teaser views on the homepage, category, and search result pages to improve performance.

5. Scenario-Based Guide

Scenario 1: Addressing Slow Page Load Times Due to Pricing Scripts

Problem:
Your storefront homepage takes 10-20 seconds to load due to pricing scripts executing repeatedly for products.

Solution:

  1. Navigate to the Catalogue Settings page in the admin panel.
  2. Enable the setting "Use precalculated price on Product Teaser."
  3. Monitor the load times after enabling the setting. Cached prices will now be used for product teasers, reducing script execution overhead.

6. FAQs

Q: What happens if I disable the "Use precalculated price on Product Teaser" setting?
A: Cached prices are reset to null, and prices are calculated on the fly in real-time.

Q: Will enabling cached pricing affect real-time updates?
A: No, background jobs automatically update cached prices when product-related data changes.


For additional information and detailed tutorials, the Infigo Academy offers extensive resources on a wide variety of topics. Visit the Infigo Academy to search and browse our content.

How to Configure Pricing Scripts for Checkout Attributes

 

Previously, pricing scripts could only be attached to products.
With this enhancement, scripts can now be assigned to checkout attributes, such as delivery options, service levels, or gift-wrapping choices - so that selecting an option during checkout can automatically update the basket total.

This gives greater flexibility in how pricing is handled across the entire checkout process, especially for storefronts that require surcharges, discounts, or conditional fees unrelated to individual products.


What’s included

  • Ability to assign pricing scripts to checkout attributes

  • Live recalculation of basket totals when attribute values change

  • Optional debug/output display via info-type attributes

  • Support for applying both fixed and percentage-based adjustments


Key settings

  • Target Scope: determines where the script will run. Select Checkout Attributes to trigger pricing logic when a checkout field changes.

  • Pricing Script: links your script to a specific attribute. Found under Admin → Checkout Attributes → Edit.

  • Debug Mode: optional setting that outputs live script results in-basket for testing and verification.


Use cases

  • Add a surcharge for “Express Delivery” or “Same-Day Dispatch.”

  • Offer a “Gift Wrap” service for an additional fee.

  • Apply a discount when a customer selects “Eco Packaging” or “Digital Delivery.”

  • Introduce donation or tip fields that modify the basket total automatically.


Step-by-step implementation

Step 1 – Create or edit a pricing script

  1. Go to Admin → Pricing Scripts.

  2. Click Add new or edit an existing script.

  3. Write your pricing logic as required.

  4. Set Target Scope to Checkout Attributes.

  5. Save the script.


Step 2 – Assign the script to a checkout attribute

  1. Navigate to Admin → Checkout Attributes.

  2. Select an existing attribute or create a new one.

  3. In the Pricing Script field, choose your newly created script.

  4. Save the attribute.

 


Step 3 – Test your configuration

  1. Add any product to your basket and proceed to checkout.

  2. Change the linked checkout attribute (e.g., tick Gift Wrap).

  3. Confirm that basket totals update immediately.

  4. (Optional) Enable debug mode to view live calculation results.

Using Multi-Part CSVs with the Generic Pricing Script

 

This guide covers how to configure multi-part CSV pricing within the Generic Pricing Script.
By splitting one large CSV into several smaller ones, you can significantly improve performance and maintain manageability for products with thousands of pricing combinations.

The example shown in the tutorial can be viewed on the training storefront:
👉 training.infigosoftware.com/pricingscripts
Look for the product Multipart CSV Pricing Scripts.


Key settings

In the product variant configuration (where you manage your Generic Pricing Script), the following parameters are essential:

Setting Description
subdirectory The name of the folder inside Global Additional Data where all partial CSV files are stored.
baseFileName The common prefix shared by all partial CSV files.
separator The delimiter that separates the prefix from the unique suffix in file names (e.g. “-” or “_”).
splitMapping Identifies which attribute defines how the CSVs are split (e.g. “B”).
filePath Must be blank when using multi-part CSVs, as pricing is determined by multiple files rather than one.

Use cases

  • High-volume pricing tables: Products with thousands of attribute combinations.

  • Complex configuration options: When loading one large CSV causes slowdowns in price updates.

  • Segmented logic: When each CSV corresponds to a specific attribute or option (e.g. “Size” or “Material”).

  • Scalable management: Easier to maintain, replace, or update parts of a large pricing matrix without affecting others.


Step-by-step implementation

Step 1 – Prepare your CSVs

  1. Split your main pricing CSV into multiple smaller ones.

  2. Each CSV should represent a consistent subset — for example, all combinations for one attribute value.

  3. Ensure that each file follows a consistent naming pattern:

    • Common prefix: Shared by all files (e.g. subdirectory)

    • Separator: A dash, underscore, or another symbol (e.g. -)

    • Unique suffix: Corresponds to the relevant attribute value (e.g. 1subdirectory-1.csv, 2subdirectory-2.csv)


Step 2 – Upload CSVs to Global Additional Data

  1. Go to Admin → Global Additional Data.

  2. Create a new subdirectory (e.g. “MultipartPricing”).

  3. Upload all partial CSVs into this folder.

    đź’ˇ Each subdirectory acts as a “container” for a complete set of related CSVs.


Step 3 – Configure the product variant

  1. Open the product in Admin → Catalog → Products → Product Variants.

  2. In the Generic Pricing Script configuration area, enter:

    • subdirectory = MultipartPricing

    • baseFileName = subdirectory (or your chosen prefix)

    • separator = -

    • splitMapping = B (or your chosen attribute)

    • filePath = (leave blank)

  3. Save your changes.


Step 4 – Test and validate

  1. Use Test Mode in the product’s admin view to confirm that prices return correctly for all attribute combinations.

    • Ensure you have a default configuration that returns a price (you may need to preselect attribute values).

  2. On the storefront, switch between attributes to confirm that pricing updates seamlessly.

  3. Observe the faster load times — even with large datasets, prices should update smoothly.


Tips & best practice

  • Keep all CSVs formatted identically to avoid parsing errors.

  • Limit each CSV to a manageable size (a few hundred lines) for best performance.

  • Use consistent file naming: prefix-separator-suffix.csv.

  • When testing, watch for pricing mismatches that might indicate missing or misnamed files.

  • If performance remains slow, review your attribute split mapping — ensuring that the split attribute properly segments your data.

  • Always keep a backup of your CSVs before restructuring or renaming files.

Configuring Tiered Pricing in the Generic Pricing Script

 

This guide demonstrates how to configure tiered pricing using the Generic Pricing Script.
Tiered pricing lets storefront administrators define different price-per-unit levels based on the quantity ordered — ideal for bulk discounts or wholesale models.

You’ll learn how to structure your CSV data, configure the script, and test the setup so your storefront automatically adjusts prices based on quantity brackets.


Key settings

Setting Description
filePath Specifies the name of the CSV file (uploaded to Global Additional Data) that contains the pricing data.
quantityColumnName Defines the header name of the column in your CSV that contains quantity thresholds.
useTierPrice Enables or disables tiered pricing logic (true or false).
debugMode Optional setting to output diagnostic information when testing.
Global Additional Data The storage area where your CSV files are uploaded and managed.

Use cases

  • Bulk purchasing: Offer lower unit costs as order quantities increase.

  • Trade pricing: Automatically apply volume-based discounts for B2B customers.

  • Promotional scaling: Manage “buy more, save more” promotions easily.

  • Automated scaling: Replace manual discount rules with CSV-based pricing logic.


Step-by-step implementation

Step 1 – Review the sample product

A ready-to-view example is available for reference:
👉 training.infigosoftware.com/pricingscripts
Look for Product #3 – Tier Pricing Script.
This example includes:

  • A written description of the setup

  • The pricing script configuration

  • The example CSV data structure

  • A working demo showing pricing updates based on quantity


Step 2 – Prepare your CSV file

  1. Create a CSV with the following structure:

    A B quantity price
    1 1 1 2.50
    1 1 10 2.00
    1 1 50 1.60
    1 1 100 1.20
  2. Each attribute combination (A + B) appears multiple times — once for each quantity tier.

  3. The quantity column defines the minimum quantity for that price bracket.

  4. Save the file as a Comma Delimited CSV (.csv).

đź’ˇ Example logic:

  • Quantity 8 → falls in tier ≤10 → £2 per unit

  • Quantity 25 → falls in tier ≤50 → £1.60 per unit

  • Quantity 70 → exceeds last tier → £1.20 per unit


Step 3 – Upload your CSV

  1. Go to Admin → Global Additional Data.

  2. Upload your new CSV file.

  3. If needed, rename it using the gear ⚙️ icon (e.g., tierpricing.csv).

  4. Note the exact filename — you’ll reference it in your script configuration.


Step 4 – Configure the product

  1. Open your product in Admin → Catalog → Products → Product Variants.

  2. Ensure Generic Pricing Script is attached.

  3. In the Pricing Script Configuration box, enter the following lines:

     
    { "filePath": "tierpricing.csv", "quantityColumnName": "quantity", "useTierPrice": true, "debugMode": true }
  4. Save the configuration.

⚠️ Only include lines you’re overriding from the default script.
The last line must not have a trailing comma — otherwise, the script won’t run.


Step 5 – Test in Admin

  1. In the product’s admin view, click Test Mode.

  2. Ensure you have a default configuration that returns a price (for example, preselected attributes).

  3. Review the debug output at the top of the screen — it shows which CSV row is being used and confirms that tier pricing is active.


Step 6 – Validate on the storefront

  1. View the product page on the storefront.

  2. Select your attribute combinations.

  3. Adjust the quantity field — you’ll see the price-per-unit change dynamically as the quantity moves through defined tiers.

  4. If no tier applies, the system uses the nearest valid tier or the maximum bracket.


Tips & best practice

  • Ensure the quantity column name in your CSV matches exactly what’s defined in the script configuration (case-sensitive).

  • Keep quantity tiers sorted in ascending order to avoid misalignment.

  • Include a top-end tier (maximum quantity) so that high-order quantities always fall within a valid bracket.

  • Always validate in Test Mode before deploying to live storefronts.

  • Use debugMode = true during setup and disable it once testing is complete.

  • For better performance on large datasets, consider splitting CSVs into smaller subdirectories (see the Multi-Part CSV Pricing guide).

Incomplete
🔎
Loading…
    Select a tip or trick