public function product_detail() { $product = $this->product->get_product($_GET['id']); $product_related = $this->product->get_all_product('related', 'published', 'all_records', $product['id_product_category']); $total_product_related = $this->product->get_all_product('related', 'published', 'total_data', $product['id_product_category']); $brand = $this->brand->get_brand($product['id']); if (isset($_SESSION['user_type']) && isset($_SESSION[''])) { $user_name = ''; } else { $user_name = ''; } if ($product['status'] == 0) { $status = 'Belum Tersedia'; } else { $status = 'Tersedia'; } $this->view->assign('captcha_src', SITE_CAPTCHA_SRC); $this->view->assign('product_brand', $brand['name']); $this->view->assign('product_status', $status); $this->view->assign('product_name', $product['name']); $this->view->assign('product_price', format_rupiah($product['price'])); $this->view->assign('product_description', $product['description']); $this->view->assign('product_img_thumb', $this->img_dir . 'thumb_' . $product['image']); $this->view->assign('product_img', $this->img_dir . $product['image']); $this->view->assign('total_product_related', $total_product_related); $this->view->assign('product_related', $product_related); parent::fetch('product/product_detail', 'module'); }
public function view() { $this->view->assign('img_dir', $this->img_dir); $this->product_featured(); $this->home_banner(); $this->product_latest(); parent::fetch('home', 'module'); }
public function view() { $pcategory = $this->pcategory->get_pcategory($_GET['id']); $total_product = $this->product->get_all_product('related', 'published', 'total_data', $pcategory['id']); $product = $this->product->get_all_product('related', 'published', 'all_records', $pcategory['id']); $this->view->assign('product_img_src', $this->img_dir); $this->view->assign('product_header', $pcategory['name']); $this->view->assign('total_product', $total_product); $this->view->assign('product_list', $product); parent::fetch('product/product_list', 'module'); }
public function cart() { if ($_POST) { $update = $this->order->update_cart($_POST['id_product'], $_POST['qty']); if ($update) { redirect('customer-cart.html'); } } $cart = $this->order->view_cart(); $total_buy = $this->order->view_cart('totalbuy'); $this->view->assign('view_cart', $cart); $this->view->assign('total_buy', $total_buy); parent::fetch('customer/cart', 'module'); }
public function checkout() { $this->customer_data('disabled'); $this->view->assign('bought_data', $this->order->view_cart()); $this->view->assign('total_buy', $this->order->view_cart('totalbuy')); parent::fetch('checkout', 'module/customer'); }
private function privacy_policy() { parent::fetch('page/privacy-policy', 'module'); }
public function view() { $this->view->assign('username', ucfirst(strtolower($_SESSION['username']))); parent::fetch('home/home', 'module'); }