Fountain

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 

paddleCheckoutScript


array(1) { ["uuid"]=> string(23) "page://R5NyHN74pSCI5W8r" } array(1) { ["uuid"]=> string(23) "page://g6Ng4EgaMZNYVKV3" } array(1) { ["uuid"]=> string(23) "page://g7BixMNZ35KM6Kef" } array(1) { ["uuid"]=> string(23) "page://QH0sZO0BQZm21F6s" } array(1) { ["uuid"]=> string(23) "page://ZKR1xCeAYZ4Bqz7u" } array(1) { ["uuid"]=> string(23) "page://NxbcFhKvwR0thJTz" } array(1) { ["uuid"]=> string(23) "page://BJqxqH7VQVw0m36c" } array(1) { ["uuid"]=> string(23) "page://krchDUnsOaxwxwMV" } array(1) { ["uuid"]=> string(23) "page://v7MNKuFZRkgghvvJ" } array(1) { ["uuid"]=> string(23) "page://dzsHqpyUq33qSDQm" } array(1) { ["uuid"]=> string(23) "page://rcnc2blzjqevosgw" } array(1) { ["uuid"]=> string(23) "page://kv9l1TfraZdk9xKJ" }