-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Adding some basic search capabilities #69
Conversation
Awesome only suggestion is to return the items that match as well ? Thoughts ? |
The returned array contains all matching cart items. Or did you mean inspect those in the tests, rather than just count the size of the array? |
Yah for the test just make sure the item when returned actually has those options |
Will do. |
{ | ||
foreach ($data as $key => $value) { | ||
if ($this->$key !== $value) { | ||
// all search criteria must match |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comment , no need
Let me know if you think any other tests would help. |
I just made a huge update to laracart. Sadly this caused conflicts with yours. |
ill look at it in a bit to merge. |
I can move these changes into a new PR off master tonight if that's easier, too. |
That would be great. On Fri, Feb 5, 2016 at 6:14 PM, Brandon Martus notifications@github.com
|
got it. |
I needed a way to see if a certain type of product was in the users cart. This allows you to send an array of key-val pairs and it will return an array of items where all options match.
Let me know if you can think of anything else to add or test, I don't mind updating.