示例#1
0
 public function indexAction()
 {
     $fc = FrontController::getInstance();
     $model = new FrontModel();
     $model->setData(['basket' => Basket::getProductsFromBasket(TRUE)]);
     $output = $model->render('../views/order/order.php', 'withoutSliderAndSidebar');
     $fc->setPage($output);
 }
示例#2
0
 public function getProductsFromBasketAction()
 {
     header('Content-Type: application/json; charset=utf-8');
     header('Cache-Control: no-store, no-cache');
     header('Expires: ' . date('r'));
     $mode = FALSE;
     if (filter_has_var(INPUT_GET, 'mode')) {
         $mode = (bool) filter_input(INPUT_GET, 'mode', FILTER_SANITIZE_NUMBER_INT);
     }
     echo json_encode(Basket::getProductsFromBasket($mode));
 }