<div class="container">

<div class="col-md-9 text-justify">
 <?php $iteamtitle=str_replace("-"," ",$title); ?>
<div class="col-md-12" style="margin-bottom:20px;" ><font style="font-size:13px; width:100%;">  Home&nbsp;»&nbsp;Product Search</font></div>
 
 <div style="width:100%;height:30px;"><font style="font-size:13px; margin-bottom:20px; width:100%;"> </font></div>

   <h4 style="text-transform:uppercase;"><?=$iteamtitle?></h4>
  <?php if($searchresult): foreach($searchresult as $row):	?>    
    

        
       
		
        <a href="<?php echo site_url( 'Product/view/'.$row['aid'].'/'.url_title($row['title'], '-', TRUE) ) ; ?>"  class="colrl">
        
        <div class="featured_list" >
        
       
        
        <?php if($row['img']!=''): ?>
        <img src="<?php echo base_url('assets/images/'.$row['img']) ; ?>" width="170" height="170"  border="0"/>
        <?php else: ?>
        <img src="<?php echo base_url('assets/web_images/no_image.jpg') ; ?>" width="170" height="170" border="0"/>
        <?php endif; ?>
        
    
        <h4><?php echo $row['title'] ; ?></h4>
        
        <div class="featured_list_bottom3" <?php if($row['price']==''){?> style="bottom:25px;"  <? } ?> >
        
        <div class="featured_list_inne8" style="font-size:18px;  color:#F30;">
		 
         <?php if($row['uprice']!=''): echo $row['uprice']!=0 ? ' <span style="color:#666666;font-size:14px;">MRP :</span> <i class="fa fa-inr"></i> <span style="text-decoration:line-through;">'.$row['uprice'] : '' ; ?></span><br /><?php  endif; ?>

		 <?php echo $row['price']!='' ? '<span style="color:#666666;font-size:14px;">Price:</span> <i class="fa fa-inr"></i> '.$row['price'] : '' ; ?><br />

         
         </div>
        </div>

       
        <div class="featured_list_inne8">
		<?php 
		if($row['category_id']!=0)
		{
			$cat = get_category_by_id($row['category_id']) ;
			
			if(strlen($cat)>10)
			{
			$cat2 = $cat; 
			}
			else
			{
			$cat2 = $cat ;	
			}
			
			
			echo $cat2 ;
			
		}
		?>
        </div>
        
       <div class="featured_list_inne8">
		<?php 
		if($row['brand_id']!=0)
		{
			$brnd = get_brand_by_id($row['brand_id']);
										  
			if(strlen($brnd)>10)
			{
			$brnd2 = $brnd ; 
			}
			else
			{
			$brnd2 = $brnd ;	
			}
			
			
			echo $brnd2 ;
		}
		?>
        </div>
        

       <!-- <div class="featured_list_bottom2">
        
        <div class="a"><span style="text-decoration:line-through;"><?php echo $row['price']!='' ? 'Rs .'.$row['price'] : '' ; ?></span>
		</div>
        </div>-->
       

 
        
        </div>
        
        </a>
        
        <?php endforeach; endif; ?>       
          
    </div>
  
  <div class="clr3"></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 
		
		<!--<input type="number" value="0" step="1" min="0" max="10">-->



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




       
        </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>