<div class="d-flex justify-content-center mt-4">

	<div class="card w-75">
		<table class="table table-bordered table-striped table-hover">
		<tr>
			<th><center>Nama Produk</center></th>
			<th><center>Jumlah</center></th>
			<th><center>Harga</center></th>
			<th><center>Sub-Total</center></th>
		</tr>

		<?php 
		$no=1;
		$total=0;
		foreach ($this->cart->contents() as $items) : ?>
		
		<tr>
			
			<td><center><?php echo $items['name']		?></center></td>
			<td><center><?php echo $items['qty']  		?></center></td>
			<td align="right">Rp. <?php echo number_format($items['price']+$items['keuntungan'], 0,',','.') 		?></td>
			<td align="right">Rp. <?php echo number_format($items['subtotal']+($items['keuntungan']*$items['qty']), 0,',','.')  	?></td>

		</tr>	
		
		<?php $total = $total+($items['subtotal']+($items['keuntungan']*$items['qty'])); endforeach; ?>

		<tr>
			<td colspan="3" align="right">Grand Total</td>
			<td align="right">Rp. <?php echo number_format($total, 0,',','.') ?></td>
		</tr>

	</table>

	<div align="right" class="mb-3 mr-3">
		<a href="<?php echo base_url('dashboard/hapus_keranjang') ?>"><div class="btn btn-sm btn-danger">Hapus Keranjang</div></a>

		<a href="<?php echo base_url('welcome') ?>"><div class="btn btn-sm btn-primary">Lanjutkan Belanja</div></a>

		<a href="<?php echo base_url('dashboard/pembayaran') ?>"><div class="btn btn-sm btn-success">Pembayaran</div></a>
	</div>
	</div>
	
</div>