function getProductComment($productId) { $comment = new Productcomment(); $comment->where('product_id', $productId); $comment->order_by('creationDate', "asc"); $comment->get_iterated(); $dis3['comment'] = $comment; $dis3['base_url'] = base_url(); return $this->load->view('front/product/product_comment', $dis3, TRUE); }
function list_all() { $dis['base_url'] = base_url(); $productcomments = new Productcomment(); $productcomments->order_by('created', 'desc'); $productcomments->get(); $dis['view'] = 'productcomments/list'; $dis['menu_active'] = 'Phản hồi comments'; $dis['title'] = "Phản hồi comments"; $dis['productcomments'] = $productcomments; $this->viewadmin($dis); }
function loadComment($id) { $direction = $this->input->post('direction') ? $this->input->post('direction') : "asc"; $comment = new Productcomment(); $comment->where('product_id', $id); $comment->order_by('creationDate', $direction); $comment->get_iterated(); $dis['comment'] = $comment; $dis['base_url'] = base_url(); $this->load->view('front/product/product_comment', $dis); }