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))); }