olshop/application/views/front/Cart.php

71 lines
3.0 KiB
PHP
Raw Permalink Normal View History

2020-01-02 23:12:35 +07:00
<div class="row">
<div class="col-md-3">
<div class="row">
<ul class="list-group" id="menu2">
<li class="list-group-item <?php if ($active=="Home") echo "active" ?>"><a href="<?php echo site_url('welcome') ?>"><i class="glyphicon glyphicon-home"></i> Home</a></li>
<li class="list-group-item <?php if ($active=="Produk") echo "active" ?>"><a href="<?php echo site_url('product') ?>"><i class="glyphicon glyphicon-baby-formula"></i> Produk</a></li>
<li class="list-group-item <?php if ($active=="Testimoni") echo "active" ?>"><a href="#"><i class="glyphicon glyphicon-thumbs-up"></i> Testimoni</a></li>
<li class="list-group-item <?php if ($active=="Cara Berberlanja") echo "active" ?>"><a href="#"><i class="glyphicon glyphicon-info-sign"></i> Cara Berbelanja</a></li>
<li class="list-group-item <?php if ($active=="Contact Us") echo "active" ?>"><a href="#"><i class="glyphicon glyphicon-earphone"></i> Contact Us</a></li>
<li class="list-group-item <?php if ($active=="About Us") echo "active" ?>"><a href="#"><i class="glyphicon glyphicon-briefcase"></i> About Us</a></li>
</ul>
</div>
<div class="row">
<ul class="list-group" id="kategori">
<?php foreach($kategori as $kat) { ?>
<li class="list-group-item <?php if ($active=="Home") echo "active" ?>"><a href="#"> <?php echo $kat['Nama'] ?></a></li>
<?php } ?>
</ul>
</div>
</div>
<div class="col-md-9">
<div class="row">
<h1>Cart</h1>
<?php echo form_open(site_url('cart/update')); ?>
<table cellpadding="6" cellspacing="1" style="width:100%" border="0">
<tr>
<th>QTY</th>
<th>Item Description</th>
<th style="text-align:right">Item Price</th>
<th style="text-align:right">Sub-Total</th>
</tr>
<?php $i = 1; ?>
<?php foreach ($this->cart->contents() as $items): ?>
<?php echo form_hidden($i.'[rowid]', $items['rowid']); ?>
<tr>
<td><?php echo form_input(array('name' => $i.'[qty]', 'value' => $items['qty'], 'maxlength' => '3', 'size' => '5')); ?></td>
<td>
<?php echo $items['name']; ?>
<?php if ($this->cart->has_options($items['rowid']) == TRUE): ?>
<p>
<?php foreach ($this->cart->product_options($items['rowid']) as $option_name => $option_value): ?>
<strong><?php echo $option_name; ?>:</strong> <?php echo $option_value; ?><br />
<?php endforeach; ?>
</p>
<?php endif; ?>
</td>
<td style="text-align:right"><?php echo $this->cart->format_number($items['price']); ?></td>
<td style="text-align:right">$<?php echo $this->cart->format_number($items['subtotal']); ?></td>
</tr>
<?php $i++; ?>
<?php endforeach; ?>
<tr>
<td colspan="2"> </td>
<td class="right"><strong>Total</strong></td>
<td class="right">$<?php echo $this->cart->format_number($this->cart->total()); ?></td>
</tr>
</table>
<p><?php echo form_submit('update', 'Update your Cart'); ?>
<a href="<?php echo site_url('cart/check_out')?>"><button type="button">Checkout</button></a>
</p>
</div>
</div>
</div>
</div>
</div>
</div>