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

Color Swatches feature? #17

Open
ADDISON74 opened this issue Jun 18, 2021 · 6 comments
Open

Color Swatches feature? #17

ADDISON74 opened this issue Jun 18, 2021 · 6 comments

Comments

@ADDISON74
Copy link

What do you thing about adding Color Swatches in the list for removing the orphan images?

@fballiano
Copy link
Owner

for sure, I never used the swatches so I'd have to look into that :-)

@ADDISON74
Copy link
Author

Check this out: https://info2.magento.com/rs/magentosoftware/images/Magento_Community_Edition_User_Guide_Latest.pdf.

Pages 209 - 226 Chapter 16: Swatches

@fballiano
Copy link
Owner

from what I'm reading swatches images are in wysiwyg/swatches folder, which we should exclude from the processing right?

@ADDISON74
Copy link
Author

You're right the swatch images are stored in this directory /media/wysiwyg/swatches.

Your extension checks already the contents of the WYSIWYG directory and lists all orphan files. The question is whether we should separate the swatches and treat them in a special way.

@fballiano
Copy link
Owner

in the meanwhile I pushed c76c077 which avoid processing wysiwys/swatches if swatches are enabled (during a wysiwyg sync)

@ADDISON74
Copy link
Author

Excellent. Skipping this directory was very important to avoid any issues.

After investigating custom swatches feature here are more insides. Before using the swatches coming from this directory you have to do the following actions:

  • Set up a new value for the attribute by edit it (e.g. Color = Red)
  • Create an image file then uploaded it to /media/wysiwyg/swatches directory
  • Choose the Color value from the drop-down list in product edit page.

In conclusion, a swatch image becomes orphan when its value it is not associated with an attribute value (e.g. attribute Color has no Red value, but there is a red.png file).

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

No branches or pull requests

2 participants