Skip to content

feature: Added product variants feature#46

Draft
tobi-or-not-tobi wants to merge 18 commits into
developmentfrom
feature/variants
Draft

feature: Added product variants feature#46
tobi-or-not-tobi wants to merge 18 commits into
developmentfrom
feature/variants

Conversation

@tobi-or-not-tobi
Copy link
Copy Markdown
Contributor

@tobi-or-not-tobi tobi-or-not-tobi commented Aug 1, 2024

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

@netlify
Copy link
Copy Markdown

netlify Bot commented Aug 1, 2024

Deploy Preview for dev-composable-storefront ready!

Name Link
🔨 Latest commit c5c5ed8
🔍 Latest deploy log https://app.netlify.com/sites/dev-composable-storefront/deploys/66ac68d971592e00086e1603
😎 Deploy Preview https://deploy-preview-46--dev-composable-storefront.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
3 paths audited
Performance: 42 (🟢 up 10 from production)
Accessibility: 90 (no change from production)
Best Practices: 94 (no change from production)
SEO: 80 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link
Copy Markdown

netlify Bot commented Aug 1, 2024

Deploy Preview for dev-oryx-components ready!

Name Link
🔨 Latest commit c5c5ed8
🔍 Latest deploy log https://app.netlify.com/sites/dev-oryx-components/deploys/66ac68d91876aa000889c79d
😎 Deploy Preview https://deploy-preview-46--dev-oryx-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Comment thread libs/domain/product/variant-selector/variant-selector.component.ts
Comment thread libs/domain/product/variant-selector/variant-selector.component.ts
return skuMap;
}, {} as Record<string, Record<string, string>>);

return { variants, variantDefinition };
Copy link
Copy Markdown
Contributor

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?

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;
});
Copy link
Copy Markdown
Contributor

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?

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

Successfully merging this pull request may close these issues.

2 participants