I want to get all the cart Items of current user from database while executing updateCart function but i can only get localstorage cart item. is it possible to run updateCart function only after i get all cart-item of user from database.
1.user add some items to cart -which is initially saved in localstorage and with update cart we get it in state aswell even after page reload.
2. now when user log in to his account he already have some of the item saved in database. so, when the item (before login item) matched with (loged in user item) i want to sync the quantity of those item and update cart.