shop-old/modules/widgets/new_customers.php
2026-04-20 01:03:43 +02:00

25 lines
648 B
PHP

<?php
// TODO: two variables
// number of new customers
// new customer list
// link to full list
class new_customers {
private $layout_object;
function __construct() {
$this->layout_object = Registry::get('layout_object');
}
function run() {
$customer_object = new Customer(Registry::get('base'));
$new_customer_count = $customer_object->new_customer_count();
$new_customers = $customer_object->get_new(10);
$this->layout_object->assign('new_customer_count', $new_customer_count);
$this->layout_object->assign('new_customers', $new_customers);
return $this->layout_object->fetch('widgets/new_customers.tpl');
}
}