Tier Price Quantity as Range not "XX+"

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
Quick Question: Is it possible to adjust the tier prices from displaying like:

15+  30+  100+

and instead display like

15-29  30-99  100+


Thanks in advance!
7 years ago
Try something like:


@for (var i = 0; i < Model.Count; i++)
{
    string qty;
    if (i < Model.Count - 1)
    {
        qty = Model[i].Quantity != Model[i + 1].Quantity - 1
            ? Model[i].Quantity + "-" + (Model[i + 1].Quantity - 1)
            : Model[i].Quantity.ToString();
    }
    else
    {
        qty = Model[i].Quantity + "+";
    }
    <td class="item-quantity">
        @qty
    </td>
}


in the _ProductTierPrices view.
7 years ago
Got it working! Thank you!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.