public function completeorders() { $orders_collection = new OrdersCollection(); $orders = $orders_collection->get($_GET['id']); $orders->setIsComplete($_GET['is_complete']); $orders_collection->save($orders); }
public function basket() { if (isset($_SESSION['user_id'])) { $orders_collection = new OrdersCollection($_SESSION['user_id']); echo $orders_collection->get_orders_count($_SESSION['user_id']); } else { $orders_collection = new OrdersCollection(0); } }