Developer forum

Forum » CMS - Standard features » Abandon Basket functionality without logging in

Abandon Basket functionality without logging in

Jacob Bertelsen
Reply

Hi,

Regarding abandon basket, I have been advised there are two cases:

  1. The user is logged in, but does not complete the order, so a cart is stored in DW.
    An email will be sent to the user, and this is opened on another browser. Since the user is logged in, the cart will be stored on the user, and will be shown on login
  2. The user is not logged in, and does not complete the order, so a cart is stored in DW.
    An email will be sent to the user, and this link can only be opened in the same browser, since the cart is stored as a cookie on this browser.
    If the link is opened in a browser without the cart cookie, the cart will not be shown.

The customer in question does not use forced user login, due to this being a conversion killer.

Can case 2 be fixed, by adding a parameter or whatnot to the email Abandon Cart URL, so the cookie will be recreated on the "new" browser?

 

Jakob Westhausen found a way of creating a link to the cart. However, when he tried it, the link could not be put together in the abandon cart-email (http://doc.dynamicweb.com/forum/ecommerce-standard-features/abandoned-cart-link-to-cart?PID=1605) .

 

Thank you in advance :)


Replies

 
Jacob Bertelsen
Reply

I just received from Dynamicweb, that this functionality will be implemented in a later version of Dynamicweb:

Feature 40112 .

DW:
When a DW-release with feature 40112 has been planned, please add it to this thread.

 
Nicolai Pedersen
Reply

Will do.

You also know, that if the user forwards the mail he received, everyone can open the cart...?

BR Nicolai

 
Jacob Bertelsen
Reply

Hi Nicolai,

Yes, that would be a side effect.
However, I assume the customer is smart enough to know, that they should only forward an email with that kind of information, if they want someone else to open it.

If it becomes an issue, I would add a disclaimer somewhere in the email, notifying about the effects of sharing the email and/or link.

 
Signe Jessen
Reply

Any news about Feature 40112 ? :)

 
Nicolai Pedersen
Reply

Hi Signe

You can still not link to a cart in standard DW. It is a security breach we do not like that much... Also it is an issue with the upcoming GDPR which makes this clearly illegal and should be handled with care. You should at least make sure to get a consent before sending out the email.

It is simple to implement though - below an example of how it could be implemented. Then create a link in your email with the cart id: www.domain.com/cart?abondonedCartId=CART1

[Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Notifications.Standard.Application.BeforeBeginRequest)]
    public class ApplicationBeginRequestObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
    {
        public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
        {
            if (args == null)
                return;

            if (!(args is Dynamicweb.Notifications.Standard.Application.BeforeBeginRequestArgs))
                return;

            Dynamicweb.Notifications.Standard.Application.BeforeBeginRequestArgs item = (Dynamicweb.Notifications.Standard.Application.BeforeBeginRequestArgs)args;
            System.Web.HttpApplication app = (System.Web.HttpApplication)item.sender;

           

            string cartId = app.Context.Request.QueryString["abondonedCartId"];
            if (!string.IsNullOrEmpty(cartId))
            {
                //Ecommerce.Services.Orders.GetById(cartid)
                var cart = Ecommerce.Orders.Order.GetOrderById(cartId);
                Ecommerce.Common.Context.SetCart(cart);
            }

        }
    }

BR Nicolai

 

You must be logged in to post in the forum