vtex / faststore

Digital commerce toolkit for frontend developers
https://faststore.dev
MIT License
182 stars 57 forks source link

fix: SKU Selector not choosing correct SKU when having similar variations #2365

Closed eduardoformiga closed 3 weeks ago

eduardoformiga commented 3 weeks ago

What's the purpose of this pull request?

Fix the scenario when there is more than one SKU variation with the same substring.

How it works?

When there is more than one SKU variation with the same substring, we use the getBestMatchVariation() function to exact match instead of using includes().

How to test it?

you can use the version XXX in your store to validate it.

References

tickets https://vtexhelp.zendesk.com/agent/tickets/1033578 https://vtexhelp.zendesk.com/agent/tickets/1047992

related

vercel[bot] commented 3 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
faststore-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 2, 2024 11:50pm
codesandbox-ci[bot] commented 3 weeks ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.