Site methods
Custom page methods. Available on pages using Fountain templates. Each method has one or more assigned templates it works for.
cartUrl
Return url to cart.
$site->cartUrl();
Returns | string |
---|
cartAddUrl
Return url to add to cart.
$site->cartAddUrl();
Returns | string |
---|
cartRemoveUrl
Return url to remove from cart.
$site->cartRemoveUrl();
Returns | string |
---|
accountUrl
Return url to account page.
$site->accountUrl();
Returns | string |
---|
checkoutUrl
Return url to cart checkout.
$site->checkoutUrl();
Returns | string |
---|
currency
Return Kirby\Toolkit\Obj
with code
and symbol
.
$site->currency()->code(); // e.g. EUR
$site->currency()->symbol(); // e.g. €
Returns | code() |
string |
---|---|---|
symbol() |
string |
cspNonce
$site->cspNonce();
salesData
Used in panel to display data about sales via Paddle. Displayed in the currency you use with Paddle (currently GBP, USD or EUR).
Require user with panel access.
Name | Type | Info |
---|---|---|
totalEarnings |
String |
|
totalFees |
String |
Total Paddle fees |
totalOrders |
String |
|
last7Days |
String |
Total earnings for the last seven days |
recentName |
String |
Full name of latest order |
recentDate |
String |
Date for latest order |
recentProduct |
String |
Comma separated list of all products in latest order. |
$site->salesData()->totalEarnings(); // returns