<?php
$this->load->view("top");
?>
<!----My Accounts---->
<section class="my_account_page">
  <div class="container">
    <div class="row">
      <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-3 col-12">
        <?php $this->load->view('members/left'); ?>
      </div>
        <div class="col-xxl-9 col-xl-9 col-lg-9 col-md-8 col-sm-8 col-12">
                    <div class="right_side">
                        <h1 class="bg-title">My Wishlist (<?php echo (!empty($wishlist)) ? count($wishlist) : 0; ?>)</h1>
                        <div class="wps_right wishlist">
         <?php
          validation_message();
          error_message();
          if (is_array($wishlist) && !empty($wishlist)) {
              foreach ($wishlist as $key => $val) {
                $prodets = $this->product_model->get_products('1', '0', array("productid" => $val['products_id']));
            ?>
                            <!--- Start Here-->
                            <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']; ?>" class="w-100">
                                                    </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>STYLE # SMR03192060</p>-->
                                                        <div class="pro-price-cart details_price">
                                                            <div class="pro-home-price">
                                                                <span class="product_price"><?php echo display_price($prodets[0]['product_price']); ?></span>
<!--                                                                <span class="product_del">$21.99</span>-->
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                            </div>

                            <div class="order_item">
                                <div class="wishlist_body">
                                    <div class="row">
                                        <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="Buy Now"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path d="M9 5.5a.5.5 0 0 0-1 0V7H6.5a.5.5 0 0 0 0 1H8v1.5a.5.5 0 0 0 1 0V8h1.5a.5.5 0 0 0 0-1H9V5.5z"/><path d="M.5 1a.5.5 0 0 0 0 1h1.11l.401 1.607 1.498 7.985A.5.5 0 0 0 4 12h1a2 2 0 1 0 0 4 2 2 0 0 0 0-4h7a2 2 0 1 0 0 4 2 2 0 0 0 0-4h1a.5.5 0 0 0 .491-.408l1.5-8A.5.5 0 0 0 14.5 3H2.89l-.405-1.621A.5.5 0 0 0 2 1H.5zm3.915 10L3.102 4h10.796l-1.313 7h-8.17zM6 14a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm7 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/></svg> Buy Now</a>
                                            <a class="remove" href="<?php echo site_url(); ?>members/remove_wishlist/<?php echo $val['id']; ?>" title="Remove"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z"/><path fill-rule="evenodd" d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"/></svg> Remove</a>
                                        </div>
                                    </div>
                                </div>

                            </div>

                        </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"); ?>