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/mesinpolesshinemate.com/application/modules/feature_products/views/ |
Upload File : |
<?php foreach ($home_featureproducts as $block) : ?> <div class="wrapp2"> <div class="koleksi_box"> <div class="koleksi_box_header"><?= strtoupper($block->title); ?></div> <div class="koleksi_box_wrapp clearfix"> <div class="koleksi_box_left"><a href="<?= $block->banner_link; ?>"><img src="<?= base_url() . 'uploads/banners/' . $block->image; ?>"></a></div> <div class="koleksi_box_right clearfix"> <?php //get product items $this->db->select('id_product')->from('category_product')->where('id_category', $block->category_id)->order_by('id_product', 'RANDOM')->limit(6); $products_id = $this->db->get()->result(); ?> <?php foreach($products_id as $product_id) : ?> <?php //get product detail $this->db->select('id_products, title, alias, image1')->from('products')->where('id_products', $product_id->id_product)->where('product_status', '1'); $feature_products = $this->db->get()->result(); ?> <?php foreach ($feature_products as $feature_product) : ?> <!-- Koleksi item --> <div class="koleksi_item clearfix"> <div class="koleksi_item_desc"> <div class="koleksi_item_desc_name"><a href="<?= base_url() . 'product/' . $feature_product->alias; ?>"><?= $feature_product->title; ?></a></div> <div class="koleksi_item_desc_price"> <?php //get price and discount price $this->db->select('price, discounted_price')->from('product_details')->where('product_id', $feature_product->id_products)->order_by('id_product_details', 'ASC')->limit(1); $prices = $this->db->get()->row(); $price = $prices->price; $discounted_price = $prices->discounted_price; ?> <?php if($discounted_price != 0) : ?> Rp <?= number_format($discounted_price); ?> <br><del class="hemat">Rp <?= number_format($price); ?></del> <span class="hemat">Hemat <?php $discount_amount = ($price - $discounted_price); echo number_format($discount_amount); ?> </span> <?php else : ?> Rp <?= number_format($price); ?> <?php endif; ?> </div> </div> <div class="koleksi_item_img"> <a href="<?= base_url() . 'product/' . $feature_product->alias; ?>"><img style="width:125px; height:auto;" src="<?= base_url() . 'uploads/product/small/' . $feature_product->image1; ?>" align=""></a> </div> </div><!-- End Koleksi item --> <?php endforeach; ?> <?php endforeach; ?> </div> </div> </div> </div> <?php endforeach; ?>