|
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/kamariallee.com/public_html/application/views/ |
Upload File : |
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
<!--make some space gap on top with menu-->
<div class="banner" style="padding-top: 30px;"></div>
<div class="container">
<div class="row">
<div class="col-sm-12">
<div style="color:#F00; text-transform:uppercase; font-weight: bold;" ><?php echo $message?></div>
<p><?= $this->session->flashdata('no_stock'); ?></p>
<div class="table-responsive">
<div class="myCart">
<table class="table" style="border-top:1px solid #999999; border-bottom:1px solid #999999; width: 100%;">
<?php if ($cart = $this->cart->contents()): ?>
<thead>
<tr >
<th style="width:13%">IMAGE</th>
<th style="width:36%">PRODUCT NAME</th>
<th style="width:15%; text-align: left;">UNIT PRICE</th>
<th style="width:15%; text-align: left;">QUANTITY</th>
<th style="width:15%; text-align: left;">SUB TOTAL</th>
<th style="width:6%">DELETE</th>
</tr>
</thead>
<tbody>
<?php
echo form_open('cart/update_cart');
$grand_total = 0;
foreach ($cart as $item):
echo form_hidden('cart['. $item['id'] .'][id]', $item['id']);
echo form_hidden('cart['. $item['id'] .'][rowid]', $item['rowid']);
echo form_hidden('cart['. $item['id'] .'][name]', $item['name']);
echo form_hidden('cart['. $item['id'] .'][price]', $item['price']);
echo form_hidden('cart['. $item['id'] .'][qty]', $item['qty']);
echo form_hidden('cart['. $item['id'] .'][options][size]', $item['options']['size']);
echo form_hidden('cart['. $item['id'] .'][options][sku]', $item['options']['sku']);
?>
<tr>
<td>
<?php
//get product image
$image_thumb = $this->product_m->get_image($item['id']);
?>
<?php
//get product alias
$this->db->select('alias')->from('products')->where('id_products', $item['id']);
$product_alias = $this->db->get()->row()->alias;
?>
<p style="padding-right: 10px;"><a href="<?= base_url() . 'product/' . $product_alias; ?>"><img src="<?= base_url('uploads/product/thumbnail') .'/'. $image_thumb->image1; ?>" /></a></p>
</td>
<td><a style="color:black;" href="<?= base_url() . 'product/' . $product_alias; ?>"><?php echo strtoupper($item['name']); ?></a></td>
<td>IDR <?php echo number_format($item['price']); ?></td>
<td style="padding-left: 38px;">
<?php echo form_input('cart[' . $item['id'] . '][qty]', $item['qty'], 'maxlength="3" size="3" style="text-align: center; font-family:arial;"'); ?>
</td>
<?php $grand_total = $grand_total + $item['subtotal']; ?>
<td>IDR
<?php echo number_format($item['subtotal']); ?>
</td>
<td style="padding-left: 30px;"><a title="Delete Item" href="<?=
base_url('cart/remove') . '/' . $item['rowid']; ?>">X</a></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
<?php
//set new userdata
$from_cart = array(
'is_from_cart' => 'yes',
);
$this->session->set_userdata($from_cart);
?>
<p style="text-align: right; border-bottom:1px solid #999999; padding-bottom: 10px; font-weight: bold;"><input type="submit" name="update_cart" value="Update Cart" style="background:<?= $primary_colortheme; ?>; color:white; border:none; margin-right: 57px; font-family: arial; padding:5px;">
<?php
//check if PPN 10% is active
$this->db->select('ppn_active')->from('configuration')->where('id_configuration', 1);
$ppn_active = $this->db->get()->row()->ppn_active;
?>
<?php if($ppn_active == 'yes') : ?>
<?php
$ppn_amount = $grand_total * 10/100;
$grand_total = $grand_total + $ppn_amount;
?>
<span style="font-size:120%;">Tax 10%: IDR <?php echo number_format($ppn_amount); ?></span><br>
<?php endif; ?>
<span style="font-size:120%;">TOTAL: IDR <?php echo number_format($grand_total); ?></span></p>
<p style="margin-top: 25px; margin-bottom: 100px; font-size: 15px; font-weight: bold;" class="clearfix"><a style="color:black;" id="button_continue" href="<?= base_url(); ?>"><i class="fa fa-chevron-left" aria-hidden="true"></i> CONTINUE SHOPPING</a> <a style="float:right; color:black;" id="button_checkout" href="<?= base_url('register'); ?>">CHECKOUT <i class="fa fa-chevron-right" aria-hidden="true"></i></a>
</p>
<?php echo form_close(); ?>
<?php endif; ?>
</div>
</div>
</div>