<?php
$this->load->view("top");
//$total_records=0;
?>
 <section class="banner_category" style="background-image: url('<?php echo theme_url();?>images/listing-banner.jpg');">
    <div class="container">
     
      <h1 class="banner_title">My Wishlist</h1>
    </div>
  </section>
<div class="page_breadcrumbs">
		<div class="container">
			<ul>
      <li><a href="<?=site_url();?>" title="Home">Home</a>
        </li>
        <li><a href="<?=base_url('my-account');?>" title="My Account">My Account</a>
        </li>
        <li>My Wishlist</li>
			</ul>
		</div>
	</div>

  <!----My Accounts---->
  <section class="my_account_page">
    <div class="container">
      <div class="row">
         <div class="col-md-3">
         <?php $this->load->view('members/left'); ?>
        </div>
        <div class="col-md-9 ">
        <div class="right_side">
          <h1>My Wishlist (<?php echo (!empty($wishlist))?count($wishlist):0; ?>)</h1>
           <?php validation_message();
          error_message();
          if (is_array($wishlist) && !empty($wishlist)) { ?>
          <div class="my_account wishlist">
            <!--- Start Here-->
             <?php foreach ($wishlist as $key => $val) {
              $prodets = $this->product_model->get_products('1', '0', array("productid" => $val['products_id']));
              ?>
            <div class="order_item">
              <div class="wishlist_body">
                <div class="row">
                  <div class="col-lg-8 col-md-8 col-sm-8">
                    <div class="row">
                      <div class="col-lg-3 col-md-3 col-sm-3">
                        <a href="javascript:void()">
                          <img src="<?php echo get_image('products', $prodets[0]['media'], '173', '105', 'R'); ?>" alt="<?php echo $prodets[0]['product_name']; ?>" title="<?php echo $prodets[0]['product_name']; ?>">
                        </a>
                      </div>
                      <div class="col-lg-8 col-md-8 col-sm-8">
                        <div class="wishlist_info">
                           <a href="<?php echo site_url($prodets[0]['friendly_url']); ?>" title="<?php echo $prodets[0]['product_name']; ?>"><?php echo $prodets[0]['product_name']; ?></a>
                          <!-- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit...</p --><?php echo display_price($prodets[0]['product_price']); ?></div>
                      </div>
                    </div>
                  </div>
                  <div class="col-lg-4 col-md-4 col-sm-4">
                    
                    <a class="add_to_cart " href="<?php echo site_url($prodets[0]['friendly_url']); ?>" title="Add to Cart"><i class="fa fa-shopping-cart"></i> Add to Cart</a>
                    
                    <a class="remove" href="<?php echo site_url(); ?>members/remove_wishlist/<?php echo $val['id']; ?>" title="Remove"><i class="fa fa-trash-o"></i> Remove</a>
                    
                  </div>
                </div>
              </div>
            </div>
          <?php } ?>
            
            
          </div>
          <?php }else{ ?>
          <div class="text-center mt10 thank-you">
          <h4 class="mb-70 thankyou-text">Sorry, No Results Found!</h4>
          <a href="<?=site_url('products');?>" class="btn btn-default checkout_btn" title="Continue Shopping">Continue Shopping</a>
        </div>
      <?php } ?>
        </div>
        </div>
       
      </div>
    </div>
  </section>



<?php $this->load->view("bottom"); ?>