Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cart instance add problem #16

Open
akinsayo opened this issue Jul 6, 2024 · 0 comments
Open

Cart instance add problem #16

akinsayo opened this issue Jul 6, 2024 · 0 comments

Comments

@akinsayo
Copy link

akinsayo commented Jul 6, 2024

Hello.

Cart::instance('sample')->add($items);
Works as expected when called the first time.
If an attempt is made to add additional items to the cart instance,
only the latest item is added, previous items are erased.

Cart::add($items) which represents the 'default ' cart instance works
as expected and does not erase previous cart items.

Not sure if I am doing something wrong.

Additionally, is there a way to get all cart items or count all count
items without setting a specific instance. i.e. count/get everything in
the cart (all instances).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant