Copied to clipboard

Flag this post as spam?

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


  • Biagio Paruolo 1621 posts 1914 karma points c-trib
    May 27, 2015 @ 15:46
    Biagio Paruolo
    0

    Features: abandoned cart and wish list

    Hi,

    two importan features are abandoned cart and statistics on wish lists.

    Abandonend cart: a not finalized cart must be saved into database or all cart must be saved with its status and customer or anonymous. So, after, with a push messages a store manager can send email to says why or an offer.

    Wish lists: a manager can have a list of top wish list products or wish list products for customers and the made some marketing actions.

     

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    May 27, 2015 @ 19:36
    Rusty Swayne
    100

    The carts themselves (both anonymous and customer) are saved to the database and only cleared when the customer completes a purchase, in which case they have an invoice or the Anonymous customers are cleaned up with the optional scheduled task or with some other custom code.

    The data is in the itemCache and itemCacheItem tables.

    Creating a report for the wishlist and/or abandoned carts would be done like http://merchello.com/documentation/getting-started/how-to/report

    Of course we would love to add these sorts of things to the core ... pull request =)

  • Biagio Paruolo 1621 posts 1914 karma points c-trib
    Jan 20, 2016 @ 13:28
    Biagio Paruolo
    0

    How to check or list the not finalized carts with Merchello API?

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jan 20, 2016 @ 17:01
    Rusty Swayne
    0

    At present you have to use the ItemCacheService with ItemCacheType.Basket.

    I'll add a few more methods to the service to give more control over the results.

  • Simon Dingley 1474 posts 3451 karma points c-trib
    Nov 07, 2016 @ 10:27
    Simon Dingley
    0

    I have just recently done this but had to write a SQL Query to achieve it in v2.2. In my case, I only wanted to list abandoned baskets with contact details so that the store owner could contact them to try and complete the sales.

    It's a but rough at the moment and needs tidying up so I can page results but it should help anyone that might be trying to do something similar:

    var db = UmbracoContext.Application.DatabaseContext.Database;
    var itemCacheType = EnumTypeFieldConverter.ItemItemCache.GetTypeField(_itemCacheType).TypeKey;
    var sqlquery = @"SELECT  itemCacheKey FROM  merchItemCache T1
            INNER JOIN (
                SELECT  pk, lastActivityDate
                FROM [merchAnonymousCustomer]
                WHERE   lastActivityDate BETWEEN @start AND @end
            ) Q1 ON T1.entityKey = Q1.pk
            INNER JOIN (
                SELECT  COUNT(*) AS itemCount,
                        itemCacheKey
                FROM    merchItemCacheItem
                GROUP BY itemCacheKey
            ) Q2 ON T1.pk = Q2.itemCacheKey
            WHERE Q2.itemCount > 0 AND
            T1.itemCacheTfKey = @itemCacheType
            ORDER BY Q1.lastActivityDate DESC";
    var sql = new Sql(sqlquery, new { @start = this._startDate, @end = this._endDate, @itemCacheType = itemCacheType });
    IEnumerable<Guid> keys = db.Fetch<Guid>(sql);
    
    var itemCache =
        _itemCacheService.GetByKeys(keys).Where(x => x.Items.Any(y => y.LineItemType == LineItemType.Shipping));
    
    // The baskets
    var items = new List<AnonymousCustomerItemCacheDisplay>();
    //itemCache.Select(x => x.ToAnonymousCustomerItemCacheDisplay());
    
    foreach (var basket in itemCache)
    {
        var customer = this._customerService.GetAnyByKey(basket.EntityKey);
    
        IAddress address = customer.ExtendedData.GetAddress(Merchello.Core.Constants.ExtendedDataKeys.BillingAddress);
        if (address != null && !string.IsNullOrEmpty(address.Email))
        {
            items.Add(basket.ToAnonymousCustomerItemCacheDisplay(customer, address));
        }
    }
    
  • Biagio Paruolo 1621 posts 1914 karma points c-trib
    May 27, 2015 @ 22:09
    Biagio Paruolo
    0

    Is the same for the wish lists?

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    May 28, 2015 @ 03:00
    Rusty Swayne
    0

    Yes, the idea is to put together a collection of whatever reports your client needs for their install. If they are generic enough, it would be great to offer them as a package so that everyone can use them.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies