ShoppingCartItems navigation prop no found in GetCurrentCustomerAsync in noCommerce v4.6

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
1 anno tempo fa
i am currently upgrading from 4 to 4.6 so i need to migrate the code too so where i can found
_workContext.CurrentCustomer.ShoppingCartItems in v4.6?
1 anno tempo fa
Please use the following code:

var store = await _storeContext.GetCurrentStoreAsync();
var cart = await _shoppingCartService.GetShoppingCartAsync(await _workContext.GetCurrentCustomerAsync(), ShoppingCartType.ShoppingCart, store.Id);
1 anno tempo fa
dear a.m
var cart = _shoppingCartService.GetShoppingCartAsync(_workContext.GetCurrentCustomerAsync().GetAwaiter().GetResult(), ShoppingCartType.ShoppingCart, store.Id).GetAwaiter().GetResult();
i got an error using GetShoppingCartAsync().getawaiter to return the result why?
it said
Task<> could Not be found
1 anno tempo fa
dear a.m
it was an vs issue as i restarted and it working fine now
thanks
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.