Skip to content
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

Allow different images per specification #2245

Merged
merged 2 commits into from
Mar 4, 2024

Conversation

gvc
Copy link
Contributor

@gvc gvc commented Feb 29, 2024

What's the purpose of this pull request?

The goal of this PR is to allow merchants to pick different SKU selector images for different SKU specifications. The current solution only allows one image to be picked for all Specifications. So a product with more than one Specification would look like this:

image

If this PR gets merged, given the two Specifications (Material and Size) and properly labeled images (skuvariationmaterial and skuvariationsize) merchants can pick different images for each variation, the end result being:

image

The name of the label and the fact that it has to be allinasingleword is a limitation of how the Catalog image uploader handles non-alphanumeric characters.

How to test it?

Go to the starter deploy preview and look for Awesome Chair. You should see different images for each SKU Selector. If you go to the production starter you will see the same image on both SKU Selectors.

References

I had to figure out a lot of things to create this new product (Awesome Chair) and this doc is what made everything click regarding SKUs and Specifications, you should check it out :)

Copy link

vercel bot commented Feb 29, 2024

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 Feb 29, 2024 4:02pm

Copy link

codesandbox-ci bot commented Feb 29, 2024

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.

@gvc gvc marked this pull request as ready for review March 1, 2024 00:10
@gvc gvc requested a review from a team as a code owner March 1, 2024 00:10
@gvc gvc requested review from hellofanny and renatamottam and removed request for a team March 1, 2024 00:10
Copy link
Contributor

@hellofanny hellofanny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if there is any problem using this approach, but I've tried and it's working as expected. Well done guila 🚀

Curiosity: I noticed that testing in the starter, there was a strange behaviour happening, the labels were changing places, but now it's not. Did you do anything specific related to fix it? 🤔

change.size.labels.mov

@gvc
Copy link
Contributor Author

gvc commented Mar 1, 2024

I noticed that as well, Fanny, but I didn't do anything to change it in this PR. This might be related to the actual data in the account, but it wouldn't explain why it's working on my test PR.

Copy link
Contributor

@lucasfp13 lucasfp13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@gvc gvc merged commit 1758468 into main Mar 4, 2024
7 checks passed
@gvc gvc deleted the poc-allow-multiple-images-sku-selector branch March 4, 2024 14:21
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.

4 participants