

<div class="container text-left">

<div class="col-md-9  "  align="justify"   >
 <?php if($category): foreach($category as $row_off):	?>
		
       
       
<div class="col-md-4 mar_top text-center">
<div class="product_outer2">
<div class="image_box">
 <?php if($row_off['img']!=''): ?>
        <img src="<?php echo base_url('assets/images/'.$row_off['img']) ; ?>"   class="max-width" />
        <?php else: ?>
        <img src="<?php echo base_url('assets/web_images/no_image.jpg') ; ?>" class="max-width" />
        <?php endif; ?>
</div>
<p><?=$row_off['title']?></p>
  <p style="color:#999999;"><?php echo (strlen(strip_tags($row_off['text']))>35)?substr(strip_tags($row_off['text']),0,35).'...':strip_tags($row_off['text']);?></p>
<p><a href="<?php echo site_url( 'Product/category_list/'.$row_off['id'].'/'.url_title($row_off['title'], '-', TRUE) ) ; ?>" class="read_more">Read More</a></p>

</div>
</div>
       
 <?php endforeach; endif; ?>   
 
 
 
 
    
</div>
  

<div class="col-md-3 ">

<?php  
 $currentURL = current_url(); 
$url=urlencode(base64_encode($currentURL));
echo form_open('Cart/update/'.$url.''); ?>
<form method="post">
<table class="table table-striped fnt_siz">

<h4 class="inner_bt" > <i class="fa fa-shopping-cart"></i> My Basket</h4>
    <tbody>
            <?php $i = 1; ?>
      <?php foreach ($this->cart->contents() as $items): ?>
<?php echo form_hidden($i.'[rowid]', $items['rowid']); ?>
      <tr>
       <td width="20%">
        <img src="<?php echo base_url('assets/images/') ; ?>/<?php echo $items['image']; ?>" class="img-responsive" >
       </td>
      
        <td>
        
      
        
        <?php echo $items['name']; ?><br>
        <span class="cor_r"> <?php echo $this->cart->format_number($items['price']); ?> x 
		


<!--<script type="text/javascript" src="//code.jquery.com/jquery-1.10.1.js"></script>-->
<script type="text/javascript">//<![CDATA[
$(window).load(function(){
// Cache do elemento para evitar constantes ciclos de procura pelo mesmo
var $input = $("#quantity<?php echo $items['id']; ?>");

// Colocar a 0 ao início
$input.val(<?php echo $items['qty']; ?>);

// Aumenta ou diminui o valor sendo 0 o mais baixo possível
$(".altera<?php echo $items['id']; ?>").click(function(){ 


    if ($(this).hasClass('acrescimo<?php echo $items['id']; ?>'))
        $input.val(parseInt($input.val())+1);
		 // document.getElementById("myForm").submit();
		  
		  
		  
    else if ($input.val()>=1)
	
        $input.val(parseInt($input.val())-1);
		
});

});//]]> 

</script>

        
        
<!--<input id="txtAcrescimo<?php echo $items['id']; ?>" value="4" type="text">-->
  


<button type="button" class="altera<?php echo $items['id']; ?> decrescimo<?php echo $items['id']; ?> buttooos"  >-</button>

<?php echo form_input(array('name' => $i.'[qty]', 'value' => $items['qty'], 'maxlength' => '3','id'=>'quantity'.$items['id'], 'size' => '1', 'class' => 'inppu56' )); ?></span>

<button type="button" class="altera<?php echo $items['id']; ?> acrescimo<?php echo $items['id']; ?> buttooos" >+</button>

       
</td>
<td><?php echo $this->cart->format_number($items['subtotal']); ?></td></td>
        
<td>
<a href="<?php echo site_url('Cart/delete_item/'.$items['rowid'].'/'.$url) ; ?>" class="remove" onClick="return confirm('Delete this Item ? ')"><img src="<?php echo base_url('assets/web_images/delete.gif') ; ?>" style="width:15px;" />      </a>
   
</td>
</tr>  



<?php $i++; ?>
<?php endforeach; ?>
      
      
      

      
        <tr>
   <td colspan="4">
<p><?php  echo form_submit('update', 'Update Cart','class="add_home pull-right"'); ?>

<?php $currentURL = current_url(); 
$url=urlencode(base64_encode($currentURL));
?>
<a href="<?php echo site_url('Cart/delete/'.$url.'') ; ?>" class="add_home pull-right" onclick="return confirm('Empty Cart ?')">Empty Cart</a></p>

  </td>
    </tr>
      
    </tbody>
  </table>
  
<table class="table table-striped fnt_siz">


      <tr>
        <td>Delivery Charge </td>
        <td>
        
        <?php $total=$this->cart->format_number($this->cart->total());  /*$total=$this->cart->format_number($this->cart->total()); */
  $total=$this->cart->total(); ?>
        
        
<?php if($site): foreach($site as $site_row):
$dvtcharge=$site_row['dvtcharge'];
endforeach; endif; ?>
<?=$dvtcharge?>.00
   
   </td>
        
      </tr>
      

     
     
     
        
      <tr>
        <td><b style="font-size:15px;">Total</b></td>
<td ><b style="font-size:15px;">
<?php   if($total!='' ){ $tayal2=$total+$dvtcharge; echo $tayal2; echo ".00"; $total=$this->cart->format_number($tayal2);}  else {echo "00.00"; } ?></b></td>
        
  </tr>
  
  <tr>
   <td colspan="2" >
<p><?php echo form_submit('placeorder','Place Order','class=" add_home pull-right"') ; ?></p>
  </td>
    </tr>
  
  </table>
  
  </form>
 
<h4 class="inner_bt" style="margin-top:30px;"> <i class="fa fa-shopping-cart"></i> Categories</h4>
<ul class="side_ul" >
<?php  $id=''; if($result): foreach($result as $row):  ?>
<li ><a href="<?php echo site_url( 'Product/category_list/'.$row['id'].'/'.url_title($row['title'], '-', TRUE) ) ; ?>"> 
<?php echo (strlen(strip_tags($row['title']))>20)?substr(strip_tags($row['title']),0,20).'...':strip_tags($row['title']);?></a></li>
<?php  endforeach; endif; ?> 
</ul>







  
</div>
  
  
  
  
</div>
<p>&nbsp;</p>