With an anonymous purchase, there is not Customer record - only an Anonymous Customer record. If you are asking about the use case, if they checkout anonymous and then proceed to login and have an associated customer, is there a way to associate the anonymous checkout with the customer then it is possible with a little code. You need to save a reference to the "InvoiceKey" that was generated with the anonymous checkout in a cookie, session ... whereever and then after they sign in
if(!CurrentCustomer.IsAnonymous)
{
var invoiceService = MerchelloContext.Current.Services.InvoiceService;
var invoice = invoice.GetByKey(invoiceKey);
invoice.CustomerKey = CurrentCustomer.Key;
invoiceService.Save(invoice);
}
Umbraco to Merchello customer associations after purchase
If someone has an umbraco member, and purchases anonymously (creating a merchello customer), is there an easy way to connect these two together?
With an anonymous purchase, there is not Customer record - only an Anonymous Customer record. If you are asking about the use case, if they checkout anonymous and then proceed to login and have an associated customer, is there a way to associate the anonymous checkout with the customer then it is possible with a little code. You need to save a reference to the "InvoiceKey" that was generated with the anonymous checkout in a cookie, session ... whereever and then after they sign in
is working on a reply...
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.