Helpcenter +918010117117 https://help.storehippo.com/s/573db3149f0d58741f0cc63b/ms.settings/5256837ccc4abf1d39000001/57614ef64256dc6851749879-480x480.png" [email protected] https://www.facebook.com/StoreHippohttps://twitter.com/StoreHippohttps://www.linkedin.com/company/hippoinnovations/https://plus.google.com/+Storehippo/posts
B4,309-10 Spaze iTech Park, Sector 49, Sohna Road, 122001 Gurgaon India

ms.userWishlist

This widget represents the wishlist of a logged in user.


Variables

products
Returns the array of products available in wishlist of user.

Methods

remove_from_wishlist This provides the functionality of deleting a product from user wish list. Product id is passed as a argument in this function.
move_wishlist_to_cart This provides the functionality of moving or adding a product into cart from wish list of the user.

Examples

Display user's product wishlist (vuejs themes)

<h3>{{ms.filters.translate('My Wishlist')}}</h3>
<ms-userWishlist>
    <template v-if="!wishlistData.length && !loading">
        <h2>{{ms.filters.translate('No Wishlist Item Found')}}</h2>
    </template>
    <template v-if="wishlistData.length && !loading">
        <template v-for="product in wishlistData">
            <div v-if="product && product.publish != 0">                        
                <w-product-grid-item :product="product"></w-product-grid-item>
                <button role="button" v-if="product._id"                             
                    @click="remove_from_wishlist(product._id,1)">
                    {{ms.filters.translate('Remove from Wishlist')}}
                </button>
            </div>
        </template>
    </template>
</ms-userWishlist>

Display user's product wishlist (angular themes)

<div ms-widget="ms.userWishlist" data-ng-if="ms.user.isLoggedIn">
     <h2>WishList</h2>
          <div ng-if="products.length">
               <div ng-repeat="product in products">
                    <table>
                         <tr>
                              <td style="padding:10px;padding-left:20px">
                                   <h2>{{product.name}}</h2>
                                   <h5>
                                        <b>Product Code:</b>
                                        {{product.sku | uppercase}}
                                   </h5>
                                   <div ng-if="product.seller" ms-widget="ms.seller_info_new">
                                        <h5><b>Sold By:</b> {{seller.title}}</h5>
                                   </div>
                                   <h1>{{product.price|msCurrency}}</h1>
                                   <br>
                                   <a style="padding:5px;border:1px solid black" 
                                      data-ng-click="move_wishlist_to_cart(product)">
                                             Add to Cart
                                   </a>
                                   <a style="padding:5px;border:1px solid black"
                                      data-ng-click="remove_from_wishlist(product._id)">
                                             Remove from Wishlist
                                   </a>
                              </td>
                         </tr>
               </table><br>
          </div>
     </div>
     <div ng-if="products.length==0">
          <p>No product exist in wishlist.</p>
     </div>
</div>
<div data-ng-if="!ms.user.isLoggedIn">
     <h2>WishList</h2>
     <p>No user is logged in.</p>
</div