My customer would like to prepare a shopping basket and send a link to a customer.
When the customer visits the link, the products would then already be in his shopping basket, so all the customer would have to do is checkout and pay.
Yes it is. Not directly out of the box though. You can create orders from the backend of status basket and create a custom page with a link to the basket.
You can then, on that page, set the current basket by setting the cookie. This is how we persist and clear cookies (baskets) through our API.
public virtual void ClearBasketInformation()
{
var basket = GetBasket(false);
if (basket != null)
{
basket.PurchaseOrder.BasketId = Guid.Empty;
basket.PurchaseOrder.Save();
}
var basketCookie = new HttpCookie("basketid");
basketCookie.Expires = DateTime.Now.AddDays(-1);
HttpContext.Current.Request.Cookies.Remove("basketid");
HttpContext.Current.Response.Cookies.Add(basketCookie);
}
private void PersistBasketId(Guid basketId)
{
if (!basketId.Equals(Guid.Empty))
{
HttpCookie cookie = new HttpCookie("basketid", basketId.ToString());
cookie.Expires = DateTime.Now.AddDays(30);
HttpContext.Current.Response.Cookies.Add(cookie);
// Add cookie to http context in case the basket is requested additional times during this same request
// as the cookie will be available from the request only in the next request.
HttpContext.Current.Items.Add("basketid", cookie);
}
}
Link to a specific basket from email
Hey.
My customer would like to prepare a shopping basket and send a link to a customer.
When the customer visits the link, the products would then already be in his shopping basket, so all the customer would have to do is checkout and pay.
Is that possible using uCommerce?
Thanks.
K.
Yes it is. Not directly out of the box though. You can create orders from the backend of status basket and create a custom page with a link to the basket.
You can then, on that page, set the current basket by setting the cookie. This is how we persist and clear cookies (baskets) through our API.
Thank you, I will try that.
Kinds regards.
Kris
is working on a reply...