-
Notifications
You must be signed in to change notification settings - Fork 5
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: Added product variants feature #46
base: development
Are you sure you want to change the base?
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. |
return skuMap; | ||
}, {} as Record<string, Record<string, string>>); | ||
|
||
return { variants, variantDefinition }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we providing parsing anywaay can we just move specifiv variantDefinition into variants object?
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; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
Select product (multi) variants based on attributes. The variant specific attributes are highlighted.