Correctly provide list of swatch attributes for product #11703#12237
Correctly provide list of swatch attributes for product #11703#12237therool wants to merge 3 commits intomagento:2.2-developfrom
Conversation
|
Hi, @therool. The main problem that after changing type of attribute from swatch to dropdown, swatch options stay in |
|
@omiroshnichenko yes the problem is with SELECT a.attribute_code
FROM catalog_eav_attribute c
JOIN eav_attribute a ON a.attribute_id = c.attribute_id
WHERE c.is_swatch = 1 |
|
@therool In case when you will change back, you will need to enter new data for swatches. I don't see any reason to keep swatch options data if it was converted to dropdown. |
Description
Correctly provide list of swatch attributes for product. This is an fix for #11703
The
populateAdditionalDataEavAttribute,isSwatchAttribute,isVisualSwatch,isTextSwatchmethod definitions moved fromMagento\Swatches\Helper\Dataclass toMagento\Swatches\Model\SwatchAttributesProviderclass but methods are still callable fromMagento\Swatches\Helper\Datawhich just calls theMagento\Swatches\Model\SwatchAttributesProvidermethods instead so the backward compatibility is preserved. Method definitions are moved so they can be used in theMagento\Swatches\Model\SwatchAttributesProvider::providemethod to correctly list of swatch attributes for product.Fixed Issues (if relevant)
Manual testing scenarios
Contribution checklist