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

Bug when color variant does not have the same sizes available #1780

Open
gregjotau opened this issue Jun 10, 2022 · 0 comments
Open

Bug when color variant does not have the same sizes available #1780

gregjotau opened this issue Jun 10, 2022 · 0 comments

Comments

@gregjotau
Copy link

A bit related to #1407

Discussed this with @cfxd

Observed on famme.no for the product: https://famme.no/products/seamless-tights-vortex-2

I think this is actually either a bug with Dawn or a feature. The problem that I see is that the first selected variant incudes a size which isn't sold in other colors at all. So, if the first thing you do is change the color to "Blå" and keep the size on "XXS" then there is no variant that exists there, so the fetch() function can't actually figure out a URL to fetch and find which other sizes are available.

I see two possible workarounds:

1—Add the "XXS" size to all the colors and simply set the inventory to 0; or

2—I can modify the script so that any time someone changes the options, it will automatically find and select a variant that's available in that style. See here for an example: https://www.footmotion.com.au/collections/men/products/inspire-17-male-adult?variant=38109118464186. On that variant page, the size 8 is selected, but if you click the color thumbnail to the left, you will see it switches the selected size to 8.5. You can still go back and select size 8, but whenever a selector changes it always looks for a first available variant. I haven't tried doing that with Dawn though.

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

No branches or pull requests

1 participant