I would like to create a pricing table. For each product, the table should show 3 prices: the price for 1 item, for 2 items and for 3 items.
There are quantity discounts (they are the same for all products): 10% off when buying 2 items of the same product, 15% off when buying 3 items of the same product.
The price for buying 1 item of a product is what I call the “basePrice” in my front-matter. Example of pricing table:
- 1x product X: You pay $10 (= basePrice)
- 2x product X: You pay $18 (2x$10-10%)
- 3x product X: You pay $22.50 (3x$10-15%)
Also, the pricing table should show how much $ will be saved in total:
- 1 item: saved $0
- 2 items: saved $2
- 3 items: saved $7.50
And finally the per-item-price:
- 1 item: $10 (= “basePrice”) per item
- 2 items: $9 per item
- 3 items: $7.50 per item
How can I get Kirby to generate such a pricing table for me based on the “basePrice”-front-matter?