• Set the price for a quantity in the product page tier price table. Call it once per quantity break; each call adds one tier.

    Tier prices from the script are only used when the catalog setting "Enable dynamic tier price updates" is on and the product uses a pricing script. The script is then run in tier price mode (Item.IsTierPriceMode is true) and the calls made in that run replace the product's stored tier prices in the table. If the script sets no tier prices, the stored tier prices are shown instead.

    Parameters

    • quantity: number

      The quantity the tier starts at

    • price: number

      The unit price for that quantity

    Returns void

    Example

    if (Item.IsTierPriceMode) {
    var surcharge = Item.getAttributeValue("Finish") === "Gloss" ? 0.10 : 0;
    for (var i = 0; i < Item.PricingTiers.length; i++) {
    var tier = Item.PricingTiers[i];
    setTierPrice(tier.Quantity, tier.Price + surcharge);
    }
    }

Generated using TypeDoc