Magento 2 – Fix Text Swatch or Visual Swatch Not Working

attributesconfigurable-productmagento2magento2.2.3swatches

I am trying to create basic text swatches for an attribute (instead of dropdowns). I created an attribute (for example, "size"), set the "Catalog Input Type for Store Owner" to "Text Swatch" and entered all the swatch values. I then created a configurable product with this attribute but the frontend is still showing the options in a dropdown and not in text swatches.

I have tried changing the attribute to "visual swatch" and it still shows as a dropdown.

I have reindexed and flushed the cache but it the attribute choices still show as a dropdown.

Interestingly, the text swatches are showing up in the category page but the product page is still showing the dropdown (see images below).

I am using Magento 2.2.3 and I am not running any extensions and the code has not been changed. It is almost a fresh install.

How can I get the text swatches to show up instead of a dropdown?

Please help

Product Page - options **incorrectly** showing as dropdown

Category Page - options **correctly** showing as text swatches

Best Answer

To change the display type to Text Swatch, navigate to

Dashboard > Stores > Attributes > Product

then find the 'size' attribute from the table. enter image description here enter image description here

Change the "Catalog Input Type for Store Owner" to Text Swatch enter image description here

You should now see a new column appear in the Manage Swatch section.

Add the values that you would like to show inside the swatches, then click Save.

All items that use the size attribute will now display a text swatch instead of a drop-down menu.

Related Topic