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/laciasmara.com/public_html/shop/application/modules/newarrival/views/1/ |
Upload File : |
<!-- Featured Products Carousel--> <?php if (count($new_arrivals) > 0) : ?> <section class="container" style="padding-top: 20px;"> <h3 class="text-center blueHeader"><?= ucwords(lang('new_arrival')); ?></h3> <div class="owl-carousel" data-owl-carousel="{ "nav": false, "dots": true, "margin": 15, "responsive": {"0":{"items":2},"576":{"items":2},"768":{"items":3},"991":{"items":4},"1200":{"items":4}} }"> <?php foreach ($new_arrivals as $item) : ?> <!-- Product--> <div class="grid-item"> <div class="product-card" style="padding:5px;"> <!-- product image --> <div class="product-image" style="margin-bottom: 10px;"> <!-- cek is sale --> <?php if ($item->is_sale == 'yes') : ?> <div style="width: 50px; height: 50px; color: white !important; background: #F48120; display: block; border-radius: 50%; line-height: 40px; text-align: center; z-index: 1000; font-weight: bold; position: absolute; right: 5px; box-shadow: 0px 1px 11px 3px #888888; padding-top: 5px;"> SALE </div> <?php endif; ?> <a class="product-thumb" href="<?= base_url() . 'product/' . $item->alias; ?>"> <!-- img --> <?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(); ?> <?php if (count($product_image) == 0) : ?> <?php //get placeholder image $this->db->select('image_not_available')->from('configuration')->where('id_configuration', 1); $placeholder_image = $this->db->get()->row()->image_not_available; ?> <img src="<?= base_url() . 'uploads/' . $placeholder_image; ?>" /> <?php else : ?> <img src="<?= base_url() . 'uploads/product/' . $product_image->image; ?>" /> <?php endif; ?> <!-- img --> </a> <div class="medicine-love" data-value="<?= $item->id_products; ?>" style="cursor: pointer;" <?php if ($this->session->userdata('customer')['customer_id']) : ?> id="add_wishlist_login_na<?= $item->id_products; ?>" data-toast data-toast-type="success" data-toast-position="topRight" data-toast-icon="icon-circle-check" data-toast-title="Like Product" data-toast-message="Tsshe product has been liked" <?php else : ?> id="add_wishlist_nonlogin_na<?= $item->id_products; ?>" <?php endif; ?>> <i class="far fa-heart fa-2x love-product"></i> </div> <script> $(document).ready(function() { $('#add_wishlist_login_na<?= $item->id_products; ?>').click(function() { var id_product = $(this).data("value") ajax_add_wishlist_na<?= $item->id_products; ?>(id_product); }); $('#add_wishlist_nonlogin_na<?= $item->id_products; ?>').click(function() { window.location = "<?= base_url('login'); ?>"; }); }); function ajax_add_wishlist_na<?= $item->id_products; ?>(id_product) { $.ajax({ 'url': '<?= base_url('wishlist/add_wishlist'); ?>', 'type': 'POST', 'data': { 'id_product': id_product, '<?= $this->security->get_csrf_token_name(); ?>': '<?= $this->security->get_csrf_hash(); ?>' }, 'success': function(result) {} }); } </script> </div> <!-- product image --> <!-- product name, price and ratings --> <h3 class="product-title"> <a href="<?= base_url() . 'product/' . $item->alias; ?>"><?= $item->title; ?></a> </h3> <!-- price --> <?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) : ?> <?php if ($lowest_price->discounted_price == 0) : ?> <h4 style="font-size:15px; color:<?= $primary_colortheme; ?>; line-height:0.5;display: inline;">Rp <?= number_format($lowest_price->price, 0, ',', '.'); ?></h4> <?php else : ?> <h4 style="font-size:15px; color:<?= $primary_colortheme; ?>; line-height:0.5;display: inline;">Rp <?= number_format($lowest_price->discounted_price, 0, ',', '.'); ?></h4> <br> <del>Rp <?= number_format($lowest_price->price, 0, ',', '.'); ?></del> <?php $hemat = number_format(($lowest_price->price - $lowest_price->discounted_price) / $lowest_price->price * 100); echo $hemat . '%'; ?> <?php endif; ?> <?php else : $product_detail_id = $this->db->select('id')->from('product_details')->where('product_id', $item->id_products)->where('price !=', 0)->order_by('price', 'ASC')->limit(1)->get()->row()->id; $reseller_price = $this->db->select('price')->from('resellers_price')->where('product_detail_id', $product_detail_id)->where('reseller_id', $reseller_id)->get()->row()->price; $data_reseller = $this->db->get_where('resellers', array('id_resellers' => $reseller_id))->row(); // echo "<script> console.log(".$product_detail_id."); </script>"; ?> <?php if ($lowest_price->discounted_price == 0) : ?> <h4 style="font-size:15px; color:<?= $primary_colortheme; ?>; line-height:0.5;display: inline;">Rp <?= number_format($reseller_price, 0, ',', '.'); ?></h4> <?php else : ?> <h4 style="font-size:15px; color:<?= $primary_colortheme; ?>; line-height:0.5;display: inline;">Rp <?= number_format($reseller_price, 0, ',', '.'); ?></h4> <!-- <br> <del>Rp <?= number_format($lowest_price->discounted_price, 0, ',', '.'); ?></del> <?php $hemat = number_format(($lowest_price->discounted_price - $reseller_price) / $lowest_price->discounted_price * 100); echo $hemat . '%'; ?> --> <?php endif; ?> <?php endif; ?> <!-- end price --> </div> </div> <!-- Product--> <?php endforeach; ?> </div> <div style="text-align: right;"> <a href="<?= base_url('newarrival') ?>" style="text-decoration: none;font-weight: bold;"><?= ucwords(lang('view_all')); ?></a> </div> </section> <?php endif; ?>