Temporary Cart

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 лет назад
I have a requirement for items to be processed into an order on file upload. That works fine and i check the products exists or not and flag for the user to correct.

The other requirement is for these items to be processed separately from other products already added to the customers cart. So they might have 4 items in their cart they upload 7 items - I need to pass these 7 items on to be checkout but retain these other 4 items to be processed after the uploaded order is complete.

Is this Possible in NOP at the moment without too much customization ?

Any thoughts appreciated.
6 лет назад
Hard to say without knowing how you're doing it!  Look for something like this in the source, I'm assuming you're using ConfirmOrder post:      


var cart = _workContext.CurrentCustomer.ShoppingCartItems
                .Where(sci => sci.ShoppingCartType == ShoppingCartType.ShoppingCart)
                .LimitPerStore(_storeContext.CurrentStore.Id)
                .ToList();


You can then do:


if(useMyUploadedItems){
     cart = myUploadedItems;
}else{

    cart = _workContext.CurrentCustomer.ShoppingCartItems
                .Where(sci => sci.ShoppingCartType == ShoppingCartType.ShoppingCart)
                .LimitPerStore(_storeContext.CurrentStore.Id)
                .ToList();

}


Quick idea, untested.  You could also just use a separate store (domain) for uploads.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.