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/bestseller/views/4/ |
Upload File : |
<div class="row"> <?php foreach ($best_sellers as $item) : ?> <div class="col-md-3 col-sm-3"> <div id="div_product_id" data-id="<?= $item->id_products; ?>" class="product-singleArea"> <div class="product-img"> <a href="<?= base_url() . 'product/' . $item->alias; ?>"></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(); ?> <a href="<?= base_url() . 'product/' . $item->alias; ?>"><img class="img-responsive primary_image" src="<?= base_url() . 'uploads/product/small/' . $product_image->image; ?>" alt="<?= $item->title; ?>"/></a> </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" style="width: 100%; text-align: center;"> <?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) : ?> <span> Rp <?= number_format($lowest_price->discounted_price); ?> </span> <br> <span> <small> <strike> Rp <?= number_format($lowest_price->price); ?> </strike> <span style="color:<?= $primary_colortheme;?>;"> <?= ucwords(lang('save')); ?> Rp <?= number_format($lowest_price->price - $lowest_price->discounted_price); ?> </span> </small> </span> <?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:<?= $primary_colortheme;?>; 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:<?= $primary_colortheme;?>; 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>