public function showOrderDetail($init, $id) { if ($init == 'admin') { $idData = explode('/', $_SERVER['REQUEST_URI']); $idAny = end($idData); parent::routes()->render('admin_order_detail.twig', array('app_base' => $this->appBase, 'results' => OrderDetail::showOrderDetail($id), 'title' => 'Order Details #' . $idAny)); } else { parent::routes()->render('order_detail.twig', array('app_base' => $this->appBase, 'carts' => Cart::countCart(), 'is_customer' => isset($_SESSION['emailCustomer']) ? sizeof($_SESSION['emailCustomer']) : 0, 'is_order' => Order::countOrder(), 'results' => OrderDetail::showOrderDetail($id), 'title' => 'Your Order Details')); } }
public function show($id) { $flash = $this->app->view()->getData('flash'); $infoComment = ''; $infoCart = ''; if (isset($flash['infoComment'])) { $infoComment = $flash['infoComment']; } if (isset($flash['infoCart'])) { $infoCart = $flash['infoCart']; } parent::routes()->render('show_product.twig', array('app_base' => $this->appBase, 'bugs1' => true, 'carts' => Cart::countCart(), 'comments' => Comment::showComment($id), 'info_comment' => $infoComment, 'info_cart' => $infoCart, 'is_customer' => isset($_SESSION['emailCustomer']) ? sizeof($_SESSION['emailCustomer']) : 0, 'is_order' => Order::countOrder(), 'results' => Product::showProduct($id), 'related_product' => Product::showRelatedProduct(Product::showProductCategory($id), $id), 'title' => Product::showProductName($id))); }
public function editCustomerProfile($email) { parent::routes()->render('edit_profile_customer.twig', array('app_base' => $this->appBase, 'carts' => Cart::countCart(), 'is_customer' => isset($_SESSION['emailCustomer']) ? sizeof($_SESSION['emailCustomer']) : 0, 'results' => Customer::showCustomerByEmail($email), 'title' => 'Edit Profile')); }
public function index() { parent::routes()->render('index_cart.twig', array('app_base' => $this->appBase, 'carts' => Cart::countCart(), 'is_customer' => isset($_SESSION['emailCustomer']) ? sizeof($_SESSION['emailCustomer']) : 0, 'results' => Cart::indexCart(), 'title' => 'Your Carts', 'total' => Cart::totalCart())); }
public function add() { parent::routes()->render('new_payment_confirmation.twig', array('app_base' => $this->appBase, 'carts' => Cart::countCart(), 'is_customer' => isset($_SESSION['emailCustomer']) ? sizeof($_SESSION['emailCustomer']) : 0, 'is_order' => Order::countOrder(), 'orders' => Order::showOrderPaymentConfirmation(), 'title' => 'Payment Confirmation')); }