Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Sam Gooch 24 posts 116 karma points
    Sep 19, 2017 @ 14:17
    Sam Gooch

    WishList won't persist


    As a logged in user, when I add an item to the wishlist and then call Save() it's not persisting. I can see the version key has changed against the wish list? Does anyone have any ideas?

        public JsonResult Favourite(Guid key)
                IWishList wishList = ((ICustomer)CurrentCustomer).WishList();
                var product = _productService.GetByKey(key);
                wishList.AddItem(product, 1);
                return Json(true);
            catch (Exception)
                // log
                return Json(false);

    Using v.2.5.0 and Umbraco v7.6.5.

    Thanks in advance, Sam

  • Arjan Woldring 124 posts 231 karma points
    Oct 23, 2017 @ 15:21
    Arjan Woldring

    Hi Sam,

    Did you find a solution to this problem? This week I'm gonna start with implementing a wishlist (preferable through Ajax).

    It's good to know what your findings are.

    Thanks, Arjan

  • Dossie Wossie 7 posts 100 karma points
    Oct 24, 2017 @ 18:56
    Dossie Wossie


    If this is the case, a reason could be the item at hand doesnt have any stock. For a basket, this makes sense, but not for a wishlist.

    You can uncomment the following in merchello.config to check: task type="Merchello.Web.Validation.Tasks.ValidateProductInventoryTask, Merchello.Web"

    I wrote a custom version which simply checks if its a wishlisht instead of a regular basket, in that case, it doesnt check the stock.

  • Arjan Woldring 124 posts 231 karma points
    Oct 25, 2017 @ 09:15
    Arjan Woldring

    That is useful info. I will keep that in mind while implementing.


  • Arjan Woldring 124 posts 231 karma points
    Oct 26, 2017 @ 20:37
    Arjan Woldring

    Thank you for pointing me in the right direction. I implemented also a custom task to handle the stock Issue. So all is good now!

Please Sign in or register to post replies

Write your reply to: