Pages
Collection to handle page data
Collection to handle page data
$Orders = $this->get('pages','order');
Fetch all open orders and calculate total amount with vat:
$totalVat = $this->get('pages','order')
->addWhere('status','Open')
->calculate('amount*(100+vat)/100');
Loop through pages in collection and render information:
$Pages = $this->get('pages','order')->addWhere('status','open');
foreach ( $Pages as $Page ){
$txt .= "
<h2>{$Page->getTitle()}</h2>
<p>Customer: {$Page->customer->name}</p>
";
}