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/rabbithabit.com/public_html/application/modules/featured/views/5/ |
Upload File : |
<div class="row"> <?php foreach ($featured as $item) : ?> <div class="col-md-3 col-sm-3"> <div class="product-singleArea"> <div class="product-img"> <a href="<?= base_url() . 'product/' . $item->alias; ?>"><div class="overlay"></div></a> <?php //get product image $this->db->select('image')->from('product_images')->where('product_id', $item->id_products)->where('status', '1')->order_by('product_details_id', 'ASC')->order_by('priority', 'ASC'); $product_image = $this->db->get()->row(); ?> <img class="img-responsive primary_image" src="<?= base_url() . 'uploads/product/small/' . $product_image->image; ?>" alt="<?= $item->title; ?>"/> <div class="product-cart-area"> <div class="btn-others"> <ul> <li><a href="<?= base_url() . 'wishlist/add_wishlist/' . $item->id_products; ?>"><i class="fa fa-heart-o"></i></a></li> <li><a href="<?= base_url() . 'product/' . $item->alias; ?>"><i class="fa fa-expand"></i></a></li> </ul> </div> <!-- <div class="btn-add-to-cart cart-btn"><a href="gird.html#">ADD TO CART</a></div> --> </div> </div> <div class="product-details"> <div class="product-title"><a href="<?= base_url() . 'product/' . $item->alias; ?>"><?= strtoupper($item->title); ?></a></div> <div class="product-pd"> <?php //check lowest normal price $this->db->select('price, id, discounted_price')->from('product_details')->where('product_id', $item->id_products)->where('price !=', 0)->order_by('price', 'ASC')->limit(1); $lowest_price = $this->db->get()->row(); ?> <?php $reseller_id = $this->db->select('reseller_id')->from('customers')->where('id_customers', $this->session->userdata('customer')['customer_id'])->get()->row()->reseller_id; if($reseller_id == NULL) : ?> Rp <?= number_format($lowest_price->price); ?> <?php else : ?> <?php if($category_discount_percentage != NULL) : ?> <div class="product-price">Rp <?= number_format($lowest_price->price - ($lowest_price->price * $category_discount_percentage/100)); ?><br><span style="color:grey; font-size:13px;"><strike>Rp <?= number_format($lowest_price->price); ?></strike> <?= number_format($category_discount_percentage); ?>%</span></div> <?php else : ?> <?php if ($lowest_price->discounted_price != 0): ?> <div class="product-price">Rp <?= number_format($lowest_price->discounted_price); ?><br><span style="color:grey; font-size:13px;"><strike>Rp <?= number_format($lowest_price->price); ?></strike> <?= number_format((($lowest_price->price - $lowest_price->discounted_price) / $lowest_price->price) * 100); ?>%</span></div> <?php else : ?> Rp <?= number_format($lowest_price->price); ?> <?php endif; ?> <?php endif; ?> <?php endif; ?> </div> </div> </div> </div> <?php endforeach; ?> </div>