Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Color and texture consistent when both are set #15284
Product variants may be color or texture but not both.
I used if-elseif instead to improve readability and not see that both could be simultaneously.
Product variants may be color or texture but not both. As seen in https://github.com/PrestaShop/PrestaShop/pull/12523/files#diff-284fd264950a297a1db191d6d0946ef9R47 and https://github.com/PrestaShop/PrestaShop/blob/develop/themes/classic/templates/catalog/_partials/facets.tpl#L85 I used if-elseif instead to improve readability and not see that both could be simultaneously.
The original intention of this PR was to improve and simplify the "if" condition of the template "product-variants.tpl", but in the end I modified the rest of the templates to be consistent:
On the other hand, I have not been able to perform my own tests (problems with the current dockerfile) but the screenshots provided by @marionf in "Product listing FO = color" do not fit with the code.
I will investigate a bit more and try to provide screenshots, apologies for the delay, I have little time.
This PR makes color and texture consistent in all places.
Previously, if both color and texture were selected, then in some places color was shown and in others texture was shown.
If the 2 are set, texture is shown. If the user wants to show the color it will be easy to delete the texture.