-
Notifications
You must be signed in to change notification settings - Fork 0
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
Variant Matching #239
Comments
Can you clarify what you mean by matching “by size”? My understanding is that the variant encodes the size information as well as the product. Do you mean loosening the matching criteria to use the variant only for matching the product, then use the size input to generate a list of matched variants? If that’s the case, I have a some more clarifying questions:
|
Yeah so in my experience it’s just due to sites like haven not having just a plain integer as their option “x” tag, so it’s gets mapped in “variantsBySize” to that. Then when we try to construct all “mappedVariants” it will fail to find them, due to it not just being an integer. Here’s the line it happens.. like I said, only on sites that meet this criteria. https://github.com/walmat/nebula/blob/538987a54d09ee0cbbbf480fbf8e2d424777ff94/packages/task-runner/src/shopify/classes/monitor.js#L95 |
Here’s an example of the variants for a product on Haven for reference as well:
|
Ah, I see -- I'm talking about something specific to entering a We'll need some function to properly check for the correct size (number) and correct region within a string. Our current implementation with Haven is broken on two levels:
The first case can be solved by having a "size extraction" utility method that takes the "size" value we have (which potentially isn't a number) and converts it to a valid number (or string containing the number value). This could be fed to the The second case will be a harder problem to solve. We would need to add regional data to sizes in the frontend. This would help us separate a |
Some sites include unsupported size option values, which affects our variant group matching. This commit adds a temporary workaround until the actual issue (#239) is addressed. Additionally, a linter error is fixed, some unnecessary log statements are removed, and another log statement is adjusted to only display relevant information.
* Handle Captcha State This commit adds a missing handler for the captcha state. This uses the checkouts handle request captcha method to request a captcha and wait for the token. The handler has also been updated to include error checking. * Use Protocol Interceptors to Load Captcha Page This commit adds a protocol interceptor to load our captcha html instead of the regular html for other sites. This commit also updates the captcha server middleware stack to better handle loading assets such as images/styling/js while still redirecting everything else to the captcha html page. Issue: #204 * Add Temporary Workaround for Unhandled Size Option Formats Some sites include unsupported size option values, which affects our variant group matching. This commit adds a temporary workaround until the actual issue (#239) is addressed. Additionally, a linter error is fixed, some unnecessary log statements are removed, and another log statement is adjusted to only display relevant information. * Fix Various Captcha Related Bugs This commit addresses some (not all!) captcha related bugs: - Captcha Window Reloads are now handled properly - Redundant Captcha Reset calls are removed - Attempting to add >5 captcha windows no longer crashes the frontend These are some small bugs that fall under the scope of this branch. Other larger bugs that require separate issues are not fixed in this commit.
Describe the bug
Currently we have a pretty inaccurate way of variant matching that will look at just the size and attempt to match it directly. For most sites, this won't be the case.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should match a size.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: