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

Checking if item exists in cart #71

Closed
Cannonb4ll opened this issue Feb 3, 2016 · 1 comment
Closed

Checking if item exists in cart #71

Cannonb4ll opened this issue Feb 3, 2016 · 1 comment

Comments

@Cannonb4ll
Copy link
Contributor

Hi,

Is there a way to check wether an item has already been added to the cart, or exists?

For example, if I go:

Cart::add(15, 'Product', 1, 20.00 [
  'details' => 'Test'
]);

And re-execute this, it would just +1 the quantity, but I need to check wether the item was already added to the cart (so I can prevent it beeing added again)

Something like:

Cart::hasItem(15); (15 == the product ID or something custom sortaspeak)

Which would return true or false

@lukepolo
Copy link
Owner

lukepolo commented Feb 3, 2016

Its about to be pulled in #69

Waiting for the tests to be completed.

@lukepolo lukepolo closed this as completed Feb 3, 2016
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

2 participants