https://t.me/RX1948
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/bestseller/views/3/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/laciasmara.com/public_html/shop/application/modules/bestseller/views/3/bestseller.php
<!-- Product Browse -->
<div class="product_browse" style="padding-left: 20px;" id="best_seller">
  <br>
  <h2 style="color:<?= $this->session->userdata('p_color'); ?>; text-align: center; font-size: 1.5rem;"><img title="laciasmara logo title" alt="laciasmara logo title" style="width:18px;" src="<?= base_url("themes/3/images/title-background.png"); ?>"> &nbsp;&nbsp;<?= ucwords(lang('best_seller')); ?>&nbsp;&nbsp; <img title="laciasmara logo title" alt="laciasmara logo title" style="width:18px;" src="<?= base_url("themes/3/images/title-background.png"); ?>"></h2>
  <br>
  <?php if (count($best_sellers) > 0) : ?>

    <ul class="clearfix" style="text-align: center;">
      <?php foreach ($best_sellers as $item) : ?>
        <!-- Product Item -->
        <li id="li_product_id" data-id="<?= $item->id_products; ?>">
          <div style="cursor: pointer;position: absolute;float: left;z-index: 1;width: 40px; margin-top: 37px;margin-left: 10px;">
            <?php
            $product_id = $item->id_products;
            $count_wishlist = $this->db->select('COUNT(*) as wishlist_count')
              ->from('wishlist')
              ->where('product_id', $product_id)
              ->get()
              ->row()
              ->wishlist_count;
            echo $count_wishlist;
            ?>
          </div>
          <?php
          $v_wishlist = 'add_wishlist_nonlogin_fs6';
          $heart_icon_class = 'far fa-heart fa-2x love-product';
          $wishlist = $this->db->where('product_id', $product_id)
            ->where('customer_id', $this->session->userdata('customer')['customer_id'])
            ->get('wishlist')
            ->row();

          if ($wishlist) {
            $heart_icon_class = 'fas fa-heart fa-2x love-product red-heart';
          } else {
            $v_wishlist = '';
          }
          ?>

          <?php if ($v_wishlist) : ?>
            <div class="<?= $v_wishlist; ?> medicine-love" style="cursor: pointer;position: absolute;float: left;z-index: 2;width: 40px; margin-top: 10px;margin-left: 10px;" <?php if ($this->session->userdata('customer')['customer_id']) : ?> data-toast data-toast-type="success" data-toast-position="topRight" data-toast-icon="icon-circle-check" data-toast-title="Like Product" data-toast-message="The product has been liked" <?php endif; ?> id="">
              <i class="<?php echo $heart_icon_class; ?> remove_wishlist"></i>
            </div>
          <?php endif; ?>
          <div class="product_browse_img">
            <?php
            $this->load->helper('product');
            $thumbnail = get_product_thumbnail($item->id_products);
            ?>
            <img title="<?= $thumbnail['alt1']; ?>" alt="<?= $thumbnail['alt1']; ?>" src="<?= $thumbnail['image1']; ?>" />
            <a href="<?= base_url() . 'product/' . strtolower($item->alias); ?>">
              <div class="product_browse_img_hover" style="background: unset; background-image: url('<?= $thumbnail["image2"]; ?>'); background-repeat: no-repeat; background-size: cover;"></div>
            </a>
          </div>

          <div class="product_browse_name">
            <h3><a href="<?= base_url() . 'product/' . strtolower($item->alias); ?>"><?= ucwords($item->title); ?></a></h3><span><?= ucwords($brand_name); ?></span>

            <div class="dtl_price">
              <ul>
                <?php
                $reseller_id = $this->db->select('reseller_id')->from('customers')->where('id_customers', $this->session->userdata('customer')['customer_id'])->get()->row()->reseller_id;
                $product_reviews = $this->db->select('*')->from('product_review')->where('product_id', $item->id_products)->order_by('review_date', 'DESC');
                $product_reviews = $this->db->get()->result();

                if ($reseller_id == NULL) : ?>

                  <?php $lowest_price = get_lowest_price($item->id_products); ?>
                  <?php if ($lowest_price->discounted_price == 0) : ?>
                    <li><span><!-- <?= ucwords(lang('from')); ?></span> --> <?= number_format($lowest_price->price, 0, ',', '.'); ?> IDR <br>

                        <?php
                        if (count($product_reviews) > 0) {
                          $total_sum = 0;
                          foreach ($product_reviews as $product_review) {
                            $total_sum = $total_sum + $product_review->rating;
                          }

                          $star_rating =  floor($total_sum / count($product_reviews));
                        }
                        ?>
                        <?php if (count($product_reviews) > 0) : ?>
                          <div>
                            <?php for ($i = 0; $i < $star_rating; $i++) : ?>
                              <i class="fa fa-star" style="color:<?= $primary_colortheme; ?>"></i>
                            <?php endfor; ?>
                          </div>
                        <?php endif; ?>
                        <span class="text-muted align-middle" style="font-size: 14px;"><?= count($product_reviews); ?> reviews</span><br>

                    </li>
                  <?php else : ?>
                    <li><span><!-- <?= ucwords(lang('from')); ?></span> --> <?= number_format($lowest_price->discounted_price, 0, ',', '.'); ?> IDR</li>
                    <li class="jrett"><?= number_format($lowest_price->price, 0, ',', '.'); ?> IDR <br>
                      <?php
                      if (count($product_reviews) > 0) {
                        $total_sum = 0;
                        foreach ($product_reviews as $product_review) {
                          $total_sum = $total_sum + $product_review->rating;
                        }

                        $star_rating =  floor($total_sum / count($product_reviews));
                      }
                      ?>
                      <?php if (count($product_reviews) > 0) : ?>
                        <div>
                          <?php for ($i = 0; $i < $star_rating; $i++) : ?>
                            <i class="fa fa-star" style="color:<?= $primary_colortheme; ?>"></i>
                          <?php endfor; ?>
                        </div>
                      <?php endif; ?>
                      <span class="text-muted align-middle" style="font-size: 14px;"><?= count($product_reviews); ?> reviews</span><br>
                    </li>
                  <?php endif; ?>

                <?php else : ?>

                  <?php
                  $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;
                  ?>
                  <li><span><!-- <?= ucwords(lang('from')); ?></span> --> <?= number_format($reseller_price, 0, ',', '.'); ?> IDR</li>

                <?php endif; ?>
              </ul>
            </div>
          </div>
        </li><!-- End Product Item -->
      <?php endforeach; ?>
    </ul>
  <?php endif; ?>
</div><!-- End Product Browse -->


<script>
  jQuery(document).ready(function() {
    var myInterval = setInterval(function() {
      if (jQuery('.remove_wishlist').length > 0) {
        jQuery('.remove_wishlist').off('click');
        jQuery('.remove_wishlist').click(function() {
          var id_product = jQuery(this).parents("li#li_product_id").data("id");
          ajax_remove_wishlist_fs6(id_product);
        });
        clearInterval(myInterval);
      }
    }, 200);
  });

  function ajax_remove_wishlist_fs6(product_id) {
    jQuery.ajax({
      'url': "<?= base_url() . 'wishlist/remove_wishlist'; ?>",
      'type': 'POST',
      'data': {
        'id_product': product_id,
        '<?= $this->security->get_csrf_token_name(); ?>': '<?= $this->security->get_csrf_hash(); ?>'
      },
      'success': function(result) {
        toastr.options = {
          "closeButton": false,
          "debug": false,
          "newestOnTop": false,
          "progressBar": false,
          "positionClass": "toast-top-right",
          "preventDuplicates": false,
          "onclick": null,
          "showDuration": "300",
          "hideDuration": "1000",
          "timeOut": "5000",
          "extendedTimeOut": "1000",
          "showEasing": "swing",
          "hideEasing": "linear",
          "showMethod": "fadeIn",
          "hideMethod": "fadeOut"
        }

        toastr["success"]("The product has been unliked", 'Unlike Product');
        location.reload();
      }
    });
  }
</script>

https://t.me/RX1948 - 2025