Esempio n. 1
0
 public function execute()
 {
     $curm = new shopCurrencyModel();
     $currencies = $curm->getAll('code');
     $coupm = new shopCouponModel();
     $coupons = $coupm->order('id DESC')->fetchAll('code');
     foreach ($coupons as &$c) {
         $c['enabled'] = self::isEnabled($c);
         $c['hint'] = self::formatValue($c, $currencies);
     }
     unset($c);
     $order_model = new shopOrderModel();
     $count_new = $order_model->getStateCounters('new');
     $this->view->assign(array('coupons' => $coupons, 'order_count_new' => $count_new));
 }