Server : Apache/2.4.18 (Ubuntu) System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64 User : oppastar ( 1041) PHP Version : 7.0.33-0ubuntu0.16.04.15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, Directory : /var/www/kanvakanva.com/public_html/application/views/ |
Upload File : |
<!-- BEGIN CONTENT PAGE --> <section class="all-content-page"> <!-- Banner Categories --> <div class="baner-top-categories"> <div class="categories-text-hero"> <?php if($category_name == 'All') : ?> <h1><?=$category_name?></h1> <?php else: ?> <h1><?=$category_name?></h1> <p>Categories <?=$category_name?></p> <?php endif; ?> </div> <img src="<?=base_url()?>assets/frontend_new/images/banner/11.jpg" alt="banner"> </div> <!-- End Banner Categories --> <div class="container"> <!-- Breadcrumbs --> <div class="breadcrumbs"> <a href="<?=base_url()?>">Home</a> <span><?=$category_name?></span> </div> <!-- End Breadcrumbs --> <div class="row"> <!--/////////////////--> <div class="col-xs-12 col-sm-8 col-md-9 float-r"> <div class="content-wrap"> <div class="row"> <div class="col-sm-12"> <div class="top-shop-view"> <div class="tsv-left"> </div> <div class="tsv-right"> <div class="short-wapper"> <?= form_open('category/' . $category->alias); ?> <select name="sort_product" class="short" onchange="this.form.submit();"> <option value="" <?php if ($sort_product_by == '') : ?> selected <?php endif; ?> >Sort Products</option> <option value="price-asc" <?php if ($sort_product_by == 'price-asc') : ?> selected <?php endif; ?> >Price Low-High</option> <option value="price-desc" <?php if ($sort_product_by == 'price-desc') : ?> selected <?php endif; ?> >Price High-Low</option> <option value="name-asc" <?php if ($sort_product_by == 'name-asc') : ?> selected <?php endif; ?> >Product Name A-Z</option> <option value="name-desc" <?php if ($sort_product_by == 'name-desc') : ?> selected <?php endif; ?> >Product Name Z-A</option> </select> <?= form_close(); ?> </div> </div> </div> </div> <?php foreach ($products as $item) : ?> <?php //get lowest price $this->db->select('min(price) as price,min(discounted_price) as discounted_price') ->from('stocks')->where('product_id', $item->id_products)->where('price !=', 0); $qprice = $this->db->get(); $lowest_price = $qprice->row()->price; $lowesr_disc = $qprice->row()->discounted_price; //get highest price $this->db->select('max(price) as price,max(discounted_price) as discounted_price') ->from('stocks')->where('product_id', $item->id_products)->where('price !=', 0); $qprice = $this->db->get(); $highest_price = $qprice->row()->price; $highest_disc = $qprice->row()->discounted_price; ?> <div class="col-sm-6 col-md-4 col-xs-6"> <div class="item item-cate"> <div class="product-wrap"> <div class="img-products"> <a href="<?= base_url() . 'product/' . $item->alias; ?>"> <?php if ($item->new_arrival == 'yes'): ?> <div style="width: 50px;height: 50px;color: white !important;background: #cba884;display: block;line-height: 40px;text-align: center;font-weight: bold;position: absolute;left: 1px;padding-top: 5px;z-index:1;"> NEW </div> <?php endif; ?> <?php if ($lowesr_disc > 0 || $highest_disc > 0): ?> <div style="width: 50px;height: 50px;color: white !important;background: #cba884;display: block;line-height: 40px;text-align: center;font-weight: bold;position: absolute;right: 1px;padding-top: 5px;z-index:1;"> SALE </div> <?php endif; ?> <img class="img-responsive image-default" style="width:100%;" src="<?= base_url() . 'uploads/product/small/' . $item->image1; ?>" alt="img"> </a> <?php if($item->image2 != '' && $item->image2 != null) : ?> <a class="images-last" href="<?= base_url() . 'product/' . $item->alias; ?>"> <img class="img-responsive image-default" src="<?= base_url() . 'uploads/product/small/' . $item->image2; ?>" alt="img"> </a> <?php endif; ?> <?php //check if item out of stock $this->db->select('id_stocks')->from('stocks')->where('product_id', $item->id_products)->where('stock !=', 0); $count_current_stock = $this->db->get()->num_rows(); ?> <?php if ($count_current_stock == 0): ?> <?php if ($item->preorder == '0'): ?> <img id="nostockIcon" src="<?= base_url( 'template/images/outofstock.png' ) ?>" style="width:auto;bottom: 0px;position: absolute;"> <?php else: ?> <img id="nostockIcon" src="<?= base_url( 'template/images/preorder.png' ) ?>" style="width:auto;bottom: 0px;position: absolute;"> <?php endif; ?> <?php else : ?> <?php if ($item->preorder == '1'): ?> <img id="nostockIcon" src="<?= base_url( 'template/images/preorder.png' ) ?>" style="width:auto;bottom: 0px;position: absolute;"> <?php endif; ?> <?php endif; ?> </div> <div class="product-des text-align-center margin-top-30"> <h2><a href="<?= base_url() . 'product/' . $item->alias; ?>"><?= ucwords($item->title); ?></a></h2> <?php //get brand name $this->db->select('brand, alias')->from('brands')->where('id_brands', $item->brand_id); $brand = $this->db->get()->row(); ?> <a class="f-text-links" href="<?= base_url() . 'brand/' . $brand->alias; ?>"><?= ucwords($brand->brand); ?></a> <?php if($lowest_price != 0 && $highest_price != 0 && $lowest_price != $highest_price) : ?> <span class="mc-price"> <?php if($lowesr_disc > 0) : ?> <ins class="price">IDR <?= number_format($lowesr_disc); ?><ins> <del class="disc_price"><?= number_format($lowest_price); ?></del> <?php else: ?> <ins class="price">IDR <?= number_format($lowest_price); ?><ins> <?php endif; ?> - <?php if($highest_disc > 0) : ?> <ins class="price">IDR <?= number_format($highest_disc); ?><ins> <del class="disc_price"><?= number_format($highest_price); ?></del> <?php else: ?> <ins class="price">IDR <?= number_format($highest_price); ?><ins> <?php endif; ?> </span> <?php else : ?> <?php $this->db ->select('price,discounted_price') ->from('stocks') ->where('product_id', $item->id_products) ->where('stock !=', 0) ->limit(1); $cprice = $this->db->get(); if($cprice->num_rows() > 0) : $price = $cprice->row()->price; $disc_price = $cprice->row()->discounted_price; ?> <?php if($disc_price > 0) : ?> <span class="mc-price"><ins>IDR <?= number_format($disc_price) ?></ins> <del>IDR <?= number_format($price) ?></del></span> <?php else : ?> <span class="mc-price"><ins>IDR <?= number_format($price) ?></ins></span> <?php endif; ?> <?php else : ?> <?php if ($item->discount_price > 0): ?> <span class="mc-price"><ins>IDR <?= number_format($item->discount_price) ?></ins> <del>IDR <?= number_format($item->price) ?></del></span> <?php else: ?> <span class="mc-price"><ins>IDR <?= number_format($item->price) ?></ins></span> <?php endif; ?> <?php endif; ?> <?php endif; ?> <!----- RATING -----> <?php $this->db ->select('floor(AVG(rating)) as rating,count(id_rating) as jum') ->from('rating') ->where('item_id', $item->id_products); $rating = $this->db->get(); if($rating->num_rows() > 0) { $jum_rating = $rating->row('jum'); if($rating->row('rating') == 5){ echo ' <span style="color:#cda486;font-size:17px;">★</span> <span style="color:#cda486;font-size:17px;">★</span> <span style="color:#cda486;font-size:17px;">★</span> <span style="color:#cda486;font-size:17px;">★</span> <span style="color:#cda486;font-size:17px;">★</span> '; } if($rating->row('rating') == 4){ echo ' <span style="color:#cda486;font-size:17px;">★</span> <span style="color:#cda486;font-size:17px;">★</span> <span style="color:#cda486;font-size:17px;">★</span> <span style="color:#cda486;font-size:17px;">★</span> <span style="color:#e6e6e6;font-size:17px;">★</span> '; } if($rating->row('rating') == 3){ echo ' <span style="color:#cda486;font-size:17px;">★</span> <span style="color:#cda486;font-size:17px;">★</span> <span style="color:#cda486;font-size:17px;">★</span> <span style="color:#e6e6e6;font-size:17px;">★</span> <span style="color:#e6e6e6;font-size:17px;">★</span> '; } if($rating->row('rating') == 2){ echo ' <span style="color:#cda486;font-size:17px;">★</span> <span style="color:#cda486;font-size:17px;">★</span> <span style="color:#e6e6e6;font-size:17px;">★</span> <span style="color:#e6e6e6;font-size:17px;">★</span> <span style="color:#e6e6e6;font-size:17px;">★</span> '; } if($rating->row('rating') == 1){ echo ' <span style="color:#cda486;font-size:17px;">★</span> <span style="color:#e6e6e6;font-size:17px;">★</span> <span style="color:#e6e6e6;font-size:17px;">★</span> <span style="color:#e6e6e6;font-size:17px;">★</span> <span style="color:#e6e6e6;font-size:17px;">★</span> '; } if($rating->row('rating') == 0){ echo ' <span style="color:#e6e6e6;font-size:17px;">★</span> <span style="color:#e6e6e6;font-size:17px;">★</span> <span style="color:#e6e6e6;font-size:17px;">★</span> <span style="color:#e6e6e6;font-size:17px;">★</span> <span style="color:#e6e6e6;font-size:17px;">★</span> '; } echo "<span style='color:#808080;font-size:17px;'>($jum_rating)</span>"; }else{ echo ' <span style="color:#e6e6e6;font-size:17px;">★</span> <span style="color:#e6e6e6;font-size:17px;">★</span> <span style="color:#e6e6e6;font-size:17px;">★</span> <span style="color:#e6e6e6;font-size:17px;">★</span> <span style="color:#e6e6e6;font-size:17px;">★</span> <span style="color:#808080;font-size:17px;">(0)</span> '; } ?> <!----- /RATING -----> </div> </div> </div> </div> <?php endforeach; ?> <!-- page nav --> <!-- <div class="col-md-12"> <div class="pag-nav"> <ul> <li><a href="#"><i class="fa fa-angle-left" aria-hidden="true"></i></a></li> <li class="active"><a href="#">1</a></li> <li><a href="#">2</a></li> <li><a href="#">3</a></li> <li><a href="#">...</a></li> <li><a href="#">6</a></li> <li><a href="#">7</a></li> <li><a href="#"><i class="fa fa-angle-right" aria-hidden="true"></i></a></li> </ul> </div> </div> --> <!-- End page nav --> </div> </div> </div> <!-- SIDE BAR --> <div class="col-xs-12 col-sm-4 col-md-3 float-l"> <div class="sidebar-items"> <?php $categories1 = $this->db->where('menu_type','category')->where('status', '1')->order_by('priority', 'ASC')->get('menus')->result(); ?> <?php foreach ($categories1 as $c1) : ?> <div class="in-sidebar-item"> <h4 class="sidebar-title margin-top-30"><a href="<?= base_url() . 'category/' . $c1->alias; ?>"><?= $c1->menu; ?></a></h4> <ul class="sidebar-list-links"> <?php $count_categories1 = $this->db->where('parent',$c1->category_id)->where('status', '1')->get('categories')->num_rows(); ?> <?php if($count_categories1 > 0): ?> <?php $categories2 = $this->db->select('a.*,count(c.id_products) as total_product') ->from('categories a') ->join('category_product b','a.id_categories=b.id_category','left') ->join('products c',"b.id_product=c.id_products and c.product_status='1'",'left') ->where('a.status', '1') ->where('a.parent',$c1->category_id) ->group_by('a.id_categories') ->order_by('a.priority','ASC') ->get(); ?> <?php foreach ($categories2->result() as $c2): ?> <?php if($c2->total_product > 0) : ?> <li><a href="<?= base_url() . 'category/' . $c2->alias; ?>"><?= $c2->category; ?> <span class="float-r"><?=$c2->total_product?></span> </a></li> <?php endif; ?> <?php endforeach; ?> <?php endif; ?> </ul> </div> <?php endforeach; ?> </div> </div> <!--/////////////////--> </div> </div> </section> <!-- END CONTENT PAGE -->