The ProductList
class extends the Kirby\Toolkit\Collection
.
What is special about that, is that you can pass just the id
of a product page and the price and tax are automatically calculated for you. See the Wishlist cookbook to learn more.
Collection of product items.
$item = $productList->first();
$item['id']; // nice-shoes
$item['title']; // Nice Shoes
$item['price']; // 99.99
$item['tax']; // 15.964789915966
$item['taxRate']; 19
$item['quantity']; // 2
$item['sum']; // 199.98
$item['sumTax']; // 31.9295798319