abdulhannanali / shopify-js-store

Shopify store which uses JavaScript Buy SDK
MIT License
2 stars 2 forks source link

Add Variants selection option to JavaScript #1

Open abdulhannanali opened 7 years ago

abdulhannanali commented 7 years ago

We have the functionality to add a product, but right now, only the default product is added and there's no way to select a variant. This functionality can be added fairly simply by adding the select bar in the thumbnail and the ability for the user to select options.

abdulhannanali commented 7 years ago

See #4 for another proposal, and the problem we have with selecting a variant, however this can be solved when we pass data at the top, and the product can be changed. Using a data structure such as Immutable.Map would be better instead of using the normal JavaScript object, as a lot of the manual work for deeply nested data will be done by it.

abdulhannanali commented 7 years ago

One other way can be to display each variant separately, while not optimal this can save us the hassle of managing more state related data as all the variants get their own thumbnail.