|
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/views/ |
Upload File : |
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
<!-- Breadcrumbs -->
<div class="breadcrumbs">
<div class="container">
<div class="row">
<ul class="bcrumbs" id="crumbs">
<li><a href="<?= base_url(); ?>">Home</a></li>
<li style="color:white;"><?= $product->title; ?></li>
</ul>
</div>
</div>
</div>
<!-- End of Breadcrumbs -->
<div class="container">
<div class="row">
<!-- Site Content -->
<div class="col-md-12">
<p><br><?= $this->session->flashdata('no_stock'); ?></p>
<!-- Product List -->
<div class="product-list">
<div class="row">
<div class="product-single-col">
<div class="col-md-5 col-sm-4 product-slider">
<div class="product-img ">
<div class="detail-slider">
<ul class="slides">
<?php for($i=1; $i<6; $i++) : ?>
<?php $image_loop = "image{$i}"; ?>
<?php if ($product->$image_loop != NULL) : ?>
<li data-thumb="<?= base_url() . 'uploads/product/thumbnail/'. $product->$image_loop; ?>">
<a title="<?= $product->title; ?>" style="cursor:zoom-in;" data-lightbox="image-1" href="<?= base_url() . 'uploads/product/' . $product->$image_loop; ?>"><img src="<?= base_url() . 'uploads/product/large/'. $product->$image_loop; ?>" alt="img-responsive" /></a>
</li>
<?php endif; ?>
<?php endfor; ?>
</ul>
</div>
</div>
</div>
<div class="col-md-7 col-sm-8 product-details-single">
<div >
<h3 style="font-size:20px;" class="single-product-title"><a href="#"><?= strtoupper($product->title); ?></a></h3>
<!-- <div id="productDetails">
<?php if($display_sku == 'yes') : ?>
<p style="font-size:14px;">SKU: <?= $sku; ?></p>
<?php endif; ?>
<?php if($display_stock == 'yes') : ?>
<p style="font-size:14px;"><?= ucwords(lang('stock')); ?>: <?= $stock; ?>
<?php if($stock == 1) : ?>
(<?= ucwords(lang('hurry_up')); ?>)
<?php endif; ?>
</p>
<?php endif; ?>
<?php if($display_weight == 'yes') : ?>
<p style="font-size:14px;"><?= ucwords(lang('weight')); ?>: <?= number_format($weight); ?> gram</p>
<?php endif; ?>
</div> -->
<br>
<?php
$attributes = array(
'id' => 'formAddToCart',
);
?>
<?= form_open('cart/add', $attributes); ?>
<input type="hidden" name="product_id" value="<?= $product->id_products; ?>">
<input type="hidden" name="product_name" value="<?= $product->title; ?>">
<!-- <div id="headingPrice" class="detail_top_desc_price clearfix">
<?php if ($discounted_price != 0): ?>
<div class="detail_saleprice">Rp <?= number_format($discounted_price); ?> <span class="det_oriprice" style="margin-left:20px;"><strike>Rp <?= number_format($price); ?></strike></span></div>
<div class="detail_top_desc_hemat" style="clear:both; font-size:12px;"><?= ucwords(lang('you_save')); ?> Rp <?= number_format($price - $discounted_price); ?> </div>
<input type="hidden" name="price" value="<?= $discounted_price; ?>">
<?php if($point_rewards->active =='yes') : ?>
<?php $point = $discounted_price / $point_rewards->ratio; ?>
<br><p>Bonus <strong><?= number_format(floor($point)); ?></strong> Point Rewards.</p>
<?php endif; ?>
<?php else : ?>
<div class="detail_saleprice">Rp <?= number_format($price); ?></div>
<input type="hidden" name="price" value="<?= $price; ?>">
<?php if($point_rewards->active =='yes') : ?>
<?php $point = $price / $point_rewards->ratio; ?>
<br><p>Bonus <strong><?= number_format(floor($point)); ?></strong> Point Rewards.</p>
<?php endif; ?>
<?php endif; ?>
</div><!-- end id="headingPrice" -->
<div class="shortDiscription">
<?php if($this->session->userdata('site_lang') == 'english') : ?>
<?= ucfirst($product->description_en); ?>
<?php else : ?>
<?= ucfirst($product->description); ?>
<?php endif; ?>
</div>
<!-- <?php if(count($product_links) > 0) : ?>
<p style="font-family:arial; font-size;14px;"><?= ucwords(lang('other_color')); ?>:</p>
<?php foreach($product_links as $link) : ?>
<?php
//get linked product alias, id and color_code
$this->db->select('title, alias, color_code')->from('products')->where('id_products', $link->link_to_product_id);
$product_link_atrributes = $this->db->get()->row();
?>
<a href="<?= base_url() . 'product/' . $product_link_atrributes->alias; ?>" title="<?= $product_link_atrributes->title; ?>"><span style="margin-right:10px; background-color:<?= $product_link_atrributes->color_code; ?>; width:25px; height:25px;float:left;"></span></a>
<?php endforeach; ?>
<br><br><br>
<?php endif; ?> -->
<br>
<?php if(isset($quantity_discount)) :?>
<div id="displayQuantityDiscount">
<table class="table table-striped">
<tr>
<td>Quantity</td>
<td>Price/pcs (Rp)</td>
</tr>
<?php foreach ($quantity_discount as $item) : ?>
<tr>
<td><?= $item->min_quantity; ?> & more</td>
<td><?= number_format($price - ($price * $item->discount_percentage / 100)); ?> (Discount <?= $item->discount_percentage; ?>%) </td>
</tr>
<?php endforeach; ?>
</table>
</div>
<?php endif; ?>
<?php if($count_product_stock > 0) : ?>
<div class="detail_top_addinfo">
<!-- <div class="detail_top_addinfo_label"><?= ucwords(lang('choose_option')); ?></div> -->
<!-- <div class="detail_top_addinfo_select">
<select required class="form-control" name="product_size" id="select_product_size" style="font-size: 13px; font-family: arial;">
<option value=""><?= ucwords(lang('select_enter_option')); ?>...</option>
<?php foreach ($product_details as $item) : ?>
<option value="<?= $item->id_product_details; ?>">
<?php
//get attributes
$this->db->select('product_size_id, product_attributes_id')->from('product_detail_options')->where('product_details_id', $item->id_product_details);
$attributes = $this->db->get()->result();
foreach($attributes as $attribute) {
//get option name
if($attribute->product_size_id != NULL) {
$this->db->select('product_size')->from('product_size')->where('id_product_size', $attribute->product_size_id);
$option_name = $this->db->get()->row()->product_size;
echo ucwords($option_name);
}
if($attribute->product_attributes_id != NULL) {
//get attribute name
$this->db->select('product_attributes')->from('product_attributes')->where('id_product_attributes', $attribute->product_attributes_id);
$attribute_name = $this->db->get()->row()->product_attributes;
echo ': ' . ucwords($attribute_name) . '. ';
}
}
?>
</option>
<?php endforeach; ?>
</select>
</div>
</div> -->
<br>
<!-- <div class="add_to_cart clearfix">
<div class="detail_top_addinfo_label"><?= ucwords(lang('choose_quantity')); ?></div>
<div class="add_to_cart_qty">
<select required name="qty" id="select_product_quantity" class="form-control" style="font-size: 13px; font-family: arial;">
<option value=""><?= ucwords(lang('select_quantity')); ?>...</option>
<?php for ($i=1; $i <=24 ; $i++) : ?>
<option value="<?= $i; ?>"><?= $i; ?></option>
<?php endfor; ?>
</select>
</div>
<?php if(isset($reseller_min_quantity)) : ?>
<p>Minimum Quantity: <span id="reseller_min_quantity"><?= $reseller_min_quantity; ?></span> pcs</p>
<?php endif; ?>
<br>
<div class="add-to-cart-single cart-btn">
<input style="color:white !important; background:transparent; border:none; position:relative; top:10px;" id="addToCartButton" type="submit" value="<?= strtoupper(lang('add_to_cart')); ?>" >
</div>
<div class="btn-others-single">
<ul>
<li><a href="<?= base_url() . 'wishlist/add_wishlist/' . $product->id_products; ?>"><i class="fa fa-heart-o"></i></a></li>
<li><a href=""><i class="fa fa-exchange"></i></a></li>
</ul>
</div>
</div> -->
<?php else : ?>
<!-- <p style="font-size:16px;">SOLD OUT</p> -->
<?php endif; ?>
</div>
<!-- <?php if (count($review_ratings) != 0) : ?>
<div class="product-review-list pRviewListSingle ">
<ul>
<li>
<div class="star">
<?php for ($i = 0; $i < $average_rating; $i++) : ?>
<span class="yes"><i class="fa fa-star"></i></span>
<?php endfor; ?>
</div>
</li>
</ul>
</div>
<?php endif; ?> -->
<div id="productLongDesc">
<?php if($this->session->userdata('site_lang') == 'english') : ?>
<?= ucfirst($product->long_description_en); ?>
<?php else : ?>
<?= ucfirst($product->long_description); ?>
<?php endif; ?>
</div>
<br>
<!-- <p><?= count($review_ratings); ?> <?= ucwords(lang('review')); ?> - <a style="color:black;" class="tulisReview" href="#" data-tab-destination="productReview"><?= ucwords(lang('add_review')); ?></a></p> -->
<br>
<script>
$(document).ready(function() {
$('a.tulisReview').click(function(event) {
event.preventDefault();
$('#reviewproduk a').addClass('active');
$('#infolengkap a').removeClass('active');
$('#det1').hide();
$('#det3').show();
$('html, body').animate({
scrollTop: $('#productReview').offset().top -210
}, 900);
});
});
</script>
<div class="addsharethisinner" style="margin-top: 10px; margin-bottom: 10px">
<span class="st_twitter_hcount sharebtn" displayText="Tweet"></span>
<span class="st_googleplus_hcount" displayText="Google +"></span>
<span class="st_pinterest_hcount sharebtn" displayText="Pinterest"></span>
<span class="st_facebook_hcount sharebtn" displayText="Facebook"></span>
</div>
<br>
<script type="text/javascript">/* <![CDATA[ */$(function(){$(".addsharethis").addClass("loader");$(window).load(function(){$(".addsharethis").removeClass("loader");$(".addsharethisinner").show(400);});});$(function(){$(".addsharethis .sharebtn").click(function(){$(this).find("img").show("medium");})});/* ]]> */</script><script type="text/javascript">/* <![CDATA[ */var switchTo5x=true;/* ]]> */</script><script type="text/javascript" src="https://ws.sharethis.com/button/buttons.js">/* <![CDATA[ *//* ]]> */</script><script type="text/javascript">/* <![CDATA[ */stLight.options({publisher:"ea22d519-9f98-4018-99a9-5b5f1b100fa8",doNotHash:false,doNotCopy:false,hashAddressBar:false});/* ]]> */</script>
</div>
</div>
</div>
<!-- Product Single -->
<!-- Product Info Tab -->
<div class="row productINFOtab">
<div class="product-info-tab col-md-12">
<ul class="InfoTab" role="tablist" id="infoTab">
<!-- <li role="presentation" class="active"><a href="detail.html#discription" aria-controls="discription" role="tab" data-toggle="tab"><?= strtoupper(lang('description')); ?></a></li>
<li role="presentation"><a href="detail.html#review" aria-controls="review" role="tab" data-toggle="tab"><?= strtoupper(lang('specification')); ?></a></li> -->
<!-- <li role="presentation"><a href="detail.html#tags" aria-controls="tags" role="tab" data-toggle="tab"><?= strtoupper(lang('review')); ?></a></li> -->
</ul>
<div class="tab-content">
<!-- <div role="tabpanel" class="tab-pane active" id="discription">
<div class="product-info-content">
Description here
</div>
</div>
<div role="tabpanel" class="tab-pane" id="review">
<div class="product-info-content">
Review here
</div>
</div> -->
<div role="tabpanel" class="tab-pane" id="review">
<div class="product-info-content">
Review here
</div>
</div>
</div>
</div>
</div>
<!-- Product Info Tab -->
</div>
</div>
<!-- Site Content -->
</div>
</div>
<br> <br>
<!-- UPSELL PRODUCTS -->
<div class="upsell">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<div class="section-title"><span><?= strtoupper(lang('you_may_like')); ?></span></div>
</div>
<?php
//get product on the same category
$this->db->select_max('id_category')->from('category_product')->where('id_product', $product->id_products);
$category_id = $this->db->get()->row()->id_category;
//select $products by given $category_id
$this->db->select('id_product')->from('category_product')->where('id_category', $category_id)->limit(4);
$products = $this->db->get()->result();
?>
<div class="hot-deal-products">
<?php foreach ($products as $product) : ?>
<?php
//get product detail
$this->db->select('id_products, title, alias, image1')->from('products')->where('id_products', $product->id_product)->where('product_status', '1')->order_by('id_product', 'RANDOM');
$related_product = $this->db->get()->row();
?>
<?php if(count($related_product) > 0) : ?>
<div class="col-md-3 col-sm-6">
<div class="product-singleArea">
<div class="product-img">
<a href="<?= base_url() . 'product/' . $related_product->alias; ?>"><img src="<?= base_url() . 'uploads/product/small/' . $related_product->image1; ?>" class="img-responsive pi-1" alt=""/></a>
</div>
<div class="product-details">
<div class="product-title"><a href="<?= base_url() . 'product/' . $related_product->alias; ?>"><?= $related_product->title; ?></a></div>
<!-- <div class="product-pd">
<div class="product-price">$50</div>
<div class="product-discount">-25%</div>
</div> -->
<!-- <div class="product-review">
<div class="star">
<span class="yes"><i class="fa fa-star"></i></span>
<span class="yes"><i class="fa fa-star"></i></span>
<span class="yes"><i class="fa fa-star"></i></span>
<span class="yes"><i class="fa fa-star"></i></span>
<span class="yes"><i class="fa fa-star"></i></span>
</div>
</div> -->
</div>
</div>
</div>
<?php endif; ?>
<?php endforeach; ?>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function() {
//chosen select for search suggestion...
//$('#select_product_size').chosen();
$('#select_product_size').change(function() {
var id_product_details = $(this).val();
ajax_get_price(id_product_details);
ajax_get_quantity_discount(id_product_details);
ajax_get_min_quantity(id_product_details);
ajax_get_quantity_options(id_product_details);
ajax_get_productdetails(id_product_details);
});
<?php if(isset($quantity_discount)) :?>
$('#select_product_quantity').change(function() {
var product_quantity = $(this).val();
var id_product_details = $('#select_product_size').val();
ajax_get_quantity_discount_price(product_quantity, id_product_details);
});
<?php endif; ?>
}); /*----end document ready -----*/
function ajax_get_price(id_product_details) {
$.ajax({
'url' : '<?php echo base_url(); ?>' + 'ajax' + '/ajax_get_price',
'type' : 'POST',
'data' : {
'id_product_details' : id_product_details,
'id_product' : '<?= $product->id_products; ?>',
'<?= $this->security->get_csrf_token_name(); ?>' : '<?= $this->security->get_csrf_hash(); ?>'
},
'success' : function(result) {
if (result) {
$('#headingPrice').html(result);
};
}
});
}
function ajax_get_productdetails(id_product_details) {
$.ajax({
'url' : '<?php echo base_url(); ?>' + 'ajax' + '/ajax_get_productdetails',
'type' : 'POST',
'data' : {
'id_product_details' : id_product_details,
'id_product' : '<?= $product->id_products; ?>',
'<?= $this->security->get_csrf_token_name(); ?>' : '<?= $this->security->get_csrf_hash(); ?>'
},
'success' : function(result) {
if (result) {
$('#productDetails').html(result);
};
}
});
}
function ajax_get_quantity_discount(id_product_details) {
$.ajax({
'url' : '<?php echo base_url(); ?>' + 'ajax' + '/ajax_get_quantity_discount',
'type' : 'POST',
'data' : {
'id_product_details' : id_product_details,
'id_product' : '<?= $product->id_products; ?>',
'<?= $this->security->get_csrf_token_name(); ?>' : '<?= $this->security->get_csrf_hash(); ?>'
},
'success' : function(result) {
if (result) {
$('#displayQuantityDiscount').html(result);
};
}
});
}
function ajax_get_quantity_discount_price(product_quantity, id_product_details) {
$.ajax({
'url' : '<?php echo base_url(); ?>' + 'ajax' + '/ajax_get_quantity_discount_price',
'type' : 'POST',
'data' : {
'id_product_details' : id_product_details,
'id_product' : '<?= $product->id_products; ?>',
'<?= $this->security->get_csrf_token_name(); ?>' : '<?= $this->security->get_csrf_hash(); ?>',
'product_quantity' : product_quantity
},
'success' : function(result) {
if (result) {
$('#headingPrice').html(result);
};
}
});
}
function ajax_get_min_quantity(id_product_details) {
$.ajax({
'url' : '<?php echo base_url(); ?>' + 'ajax' + '/ajax_get_min_quantity',
'type' : 'POST',
'data' : {
'id_product_details' : id_product_details,
'id_product' : '<?= $product->id_products; ?>',
'<?= $this->security->get_csrf_token_name(); ?>' : '<?= $this->security->get_csrf_hash(); ?>'
},
'success' : function(result) {
if (result) {
$('#reseller_min_quantity').html(result);
};
}
});
}
function ajax_get_quantity_options(id_product_details) {
$.ajax({
'url' : '<?php echo base_url(); ?>' + 'ajax' + '/ajax_get_quantity_options',
'type' : 'POST',
'data' : {
'id_product_details' : id_product_details,
'id_product' : '<?= $product->id_products; ?>',
'<?= $this->security->get_csrf_token_name(); ?>' : '<?= $this->security->get_csrf_hash(); ?>'
},
'success' : function(result) {
if (result) {
$('#select_product_quantity').html(result);
};
}
});
}
</script>
</div>