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

Feature: extend product variants #33

Closed
good-idea opened this issue Jan 15, 2020 · 7 comments
Closed

Feature: extend product variants #33

good-idea opened this issue Jan 15, 2020 · 7 comments

Comments

@good-idea
Copy link
Owner

In progress - working on adding product variants as an array of sub-fields to the Sanity documents, allowing you to extend on these variants. For instance, adding a separate descriptions or galleries of images.

@good-idea
Copy link
Owner Author

@homerjam: from #22

Also I know you have your own roadmap so maybe I'll attempt to tackle this myself but variants are higher up the priority list than deletions for me!

This is higher on my list as well. Is there anything in particular you're trying to achieve?

@good-idea good-idea added this to the 1.0 milestone Jan 15, 2020
@homerjam
Copy link
Contributor

It's early stages of the project so we're still planning things out but the store will have products with lots of variables, I wouldn't say there's anything particular - storing the sourceData as you're doing now should suffice I think. My only concern there is (as was pointed out in the round table video) that this could end up binding the project to a particular Storefront API version. Shopify has been rapidly changing so I wonder if there's anything sensible we could do to mitigate this - perhaps even creating our own product/variant/collection schemas rather than storing all the nodes/edges as is.

@good-idea
Copy link
Owner Author

Yeah, that API is kind of all over the place. I just realized that the code was using the /api/graphql endpoint - I've locked it into 2020-01 for now. Moving forward, updating this will require checking if there are any breaking changes to the Storefront API that would affect sourceData - if so, that would be a breaking change for people relying on sourceData, and we would version appropriately.

@chanmathew
Copy link

Just chiming in on how our store uses variants:

We currently have products that are 1-pack or 2-pack, and customers can choose either, with different pricing and images. So being able to pull these in and read the right images, maybe add additional fields to each variants for additional frontend rendering/logic would be pretty helpful.

@good-idea good-idea mentioned this issue Jan 23, 2020
16 tasks
@good-idea
Copy link
Owner Author

Done in #44

please give it a shot!

@chanmathew
Copy link

chanmathew commented Jan 26, 2020

Just upgraded and now when I compile the Studio I get this error:

Unknown type: productVariant. Valid types are: shopifyImageEdge, shopifySourceImages, shopifySourceImage, saneProductOption, saneMoney, saneProductPriceRange, collectionsConnection, productVariantEdge, productVariantEdges, productVariantsConnection, shopifyProductSource, selectedOption, shopifyProductVariantSource, productsConnection, shopifyCollectionSource, linkedCollections, pageInfo, shopifyNode, edge, shopifyEdges, shopifyProduct, shopifyCollection, array, block, boolean, datetime, date, document, email, file, geopoint, image, number, object, reference, slug, string, telephone, text and url

image

@good-idea
Copy link
Owner Author

good-idea commented Jan 26, 2020 via email

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

No branches or pull requests

3 participants