feature: Added product variants feature#46
Draft
tobi-or-not-tobi wants to merge 18 commits into
Draft
Conversation
json-api won't allow to restrict fields for related data, that overlaps the main entity
fix: fix variants for list
✅ Deploy Preview for dev-composable-storefront ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for dev-oryx-components ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
supproduction
suggested changes
Aug 12, 2024
| return skuMap; | ||
| }, {} as Record<string, Record<string, string>>); | ||
|
|
||
| return { variants, variantDefinition }; |
Contributor
There was a problem hiding this comment.
If we providing parsing anywaay can we just move specifiv variantDefinition into variants object?
Comment on lines
+159
to
+165
| const form = e.currentTarget as HTMLFormElement; | ||
| const formData = new FormData(form); | ||
|
|
||
| const selectedAttributes: Record<string, string> = {}; | ||
| formData.forEach((value, key) => { | ||
| selectedAttributes[key] = value as string; | ||
| }); |
Contributor
There was a problem hiding this comment.
Can we just create state component variable with all selected options and add change method to the option so in this case we should not recalculate the whole form each time?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Select product (multi) variants based on attributes. The variant specific attributes are highlighted.