Closed shohrukhsultanov closed 2 years ago
I also got the same issue, how do you deal with it? is it solved?
From the docs
Using the name() method is like having a person using two baskets in a supermarket.
In this case, I'm using the default cart name, How can I retrieve the last cart and its items? instead of creating new instance @JackieDo
When calling a cart from another controller, an empty basket comes out (most likely a new one). Created a cart like this
$cart->newInstance('shopping-cart')->useForCommercial(true)->useBuiltinTax(true);
Now I'm trying to get this cart in the checkout controller like $cart->name('shopping-cart')
but I'm getting an empty cart. How to be in such a situation? Help me please.