-
Notifications
You must be signed in to change notification settings - Fork 305
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
Variable products #66
Comments
Any luck with this @popeating ? Trying to avoid having to add completely separate products to account for simple variations. |
Hi, still working on it, it looks more complex than it looks |
I see.. thanks @popeating sounds like a tough one indeed. Would you mind sharing the |
sure, it is the twentytwenty basic theme |
I have a Gatsby sample site I created for my client as a POC, this https://gatsbysite.devsmr-development.com/portfolio/ page where you click on a category like Financial/Business/Industrial/Consumer button and portfolio items below are filtered based on the button value. I am doing this filtering at the client side, since I have only one list, I am maintaining a portfolio array state. In your cases, you need maintain a state variable for each of the product attribute dropdowns and run filter functions across appropriate dropdowns based on the value chosen by the user. If you are handling handful of items then you can do it at client side, but if you want have long list of items (thousands of items) you want to filter from, then you will have to do it at the server side to get better performance. There are tutorials available to do the same, for e.g. I followed this one to get my site done, https://www.youtube.com/watch?v=Ss1NfgBhikc. Hope this gives you some idea about the how to get this done. |
It looks like complex vaiable products (for example 3 attributes with 2 options each) but with limited variations (eg one of the option from the third attributes its only available in certain condition), can't be (easily) replicated when sourcing from graphql
in this product for example (in wordpress theme)
https://shop.popland.it/prodotto/coffee-bean/
the "dark roast" option is available only for "500 gr weight" also the packaging (tin or card) depends on weight.
we can surely access all the variations with their id, price, image, attributes, but keeping track and add/remove options based on previous selection is really a pain
anyone solved it somehow?
The text was updated successfully, but these errors were encountered: