Closed lin-d-hop closed 7 years ago
I certainly wouldn't be fussed if a search for "goats cheese" returned all the quiches in this example though of course your suggestions is much more elegant, Lynne.
Also I think there are some better examples why this is really important. For example I have a product called "speciality cheeses" shown below. A search for "feta", "mozarella, "brie" or "recotta" wouldn't return anything.
Equally my listing for "beef" which has as variants all sorts of steaks and other cuts wouldn't come up if you searched for "steak", "sirloin" or "topside".
I feel these illustrate a bit better than the quiche that this can make a huge difference.
@OliverUK Thanks for the additional examples. It is easy to argue here that these examples use variants in a way that they are not intended to be used. If that was the decision the onus would be on you to make all of these variants separate products. I chose the example such that this would not be seen to the case, as the user guide suggests variants can be used for different flavours of the same product. I would suggest that you could argue different cheeses and steaks are different products, not sizes or flavours of the same product.
@lin-d-hop That's a fair point but the shop front looks infinitely tidier since I've started using variants in this way. You can imagine, with sometimes 800+ variants live, it makes a big difference. But I do see your point.
A better ux of the shopfront is a great reason to use variants in that way. Nice point @oliveruk
Is that an additional issue to be addressed, as well as the search results? It seems like grouping lots of different products all together as variants of a single product is probably not a good idea in general, but if it currently improves the UX then maybe we need a solution that provides something similar aesthetically without actually grouping them together. A kilo of steak and half a kilo of ribs are not really variants. Mozzarella is not Stilton!
On the search results issue, if there's a match in a variant it seems like it would make the most sense to just return that variant? Like if there's 20 flavours of quiche, and only one is "mushroom" and I search for "mushroom", I don't expect to see 19 other types of quiche that aren't relevant to my search.
@Matt-Yorkley see ongoing conversation about shopfront display here: https://community.openfoodnetwork.org/t/shopfront-display/676/26
In the meantime searching variant name in the product search is a good enhancement to make :-)
Ready for testing: I should get a gold star for that one, it was really tricky.
Thanks @Matt-Yorkley - this is a great improvement.
Is it ready for testing on UK staging?
Hi @stveep @levent Would either of you be able to review @Matt-Yorkleys changes in PR #1241 ? Thanks!
@Matt-Yorkley Could you explore test coverage and adding specs here too? Cheers mate!
Done.
@lin-d-hop Deployed to UK staging and tested from Safari on Mac.
The search still includes the category name so that for example a search for "jam" will return anything sat within the category "jams and spreads". Not part of this code change of course but just to mention it.
I was curious if the search would feel sluggish with this change because more data is included but on increasing the OC to 360 variants it still performed the same as with just a few items.
Thanks Oliver!
Looks fine in Aus staging, ready for production.
Product Variants can have names that hold key information about the product. As an example: Product: Homemade Icecream Variant: Chocolate Variant: Strawberry Variant: Vanilla Variant: Chocolate chip
In the current implementation if a customer inputs 'Chocolate' they would not see the Chocolate Icecream. And really they should.
As a customer, I search for products If the search term is contained in a product name/producer/taxon
As a customer, I search for products If the search term is contained in a variant name, but not the product name/producer/taxon
1) Search Icecream Display: Product: Homemade Icecream Variant: Chocolate Variant: Strawberry Variant: Vanilla Variant: Chocolate chip
2) Search Chocolate Product: Homemade Icecream Variant: Chocolate Variant: Chocolate chip
We'd like the list of filtered products to contain the results searching upon Product Name AND Producer AND Taxon AND Variant Name.
Edit: Changed the quiche flavours into icecream flavours... hunger does not result in clear issue specification when it comes to food products :-)