public function view_order() { $cart = $this->cart->contents(); if (!empty($cart)) { //=========================== START: INFOMATION OF ORDER PRODUCT =========================== $order_product_id = array(); // Array ID of order product foreach ($this->cart->contents() as $item) { $info = array('id' => $item['id'], 'order_qty' => $item['qty']); $order_product_info[] = $info; } $info_of_order_product_array = $this->Product->info_of_order_product_array($order_product_info); //=========================== END: INFOMATION OF ORDER PRODUCT =========================== $data['info_of_order_product_array'] = $info_of_order_product_array; $data['title'] = "Đặt hàng"; $data['menu'] = $this->Product->listCategory(); $subView = "/cart/view_order_layout"; build_site($subView, $data); } else { $content = 'Chưa có sản phẩm nào trong giỏ hàng.'; set_notice('order', FAILED_STATUS, $content); header("location:" . base_url()); } }
public function contact() { $this->load->model('Contact_model', 'Contact'); $data['contact'] = $this->Contact->get_contact(); $data['title'] = 'Liên hệ'; $subView = '/contact/show_contact_layout'; $arr_data = $data; build_site($subView, $arr_data); }