Magento2: Visual Swatch not showing on product page when once set as Text Swatch

Created on 26 Jan 2016  路  14Comments  路  Source: magento/magento2

Hi,
It happended when changing Swatch type between Text Swatch and Visual Swatch back and forth.

Text Swatch -> Visual Swatch OR Visual Swatch -> Text Swatch -> Visual Swatch

Magento 2.0.1 / PHP 7.0.2

  1. Create product attribute and product template as usual.
    1
    2
  2. Create Configurable product
    3
  3. Visual Swatch is displaying on product page.
    4
  4. Now changing from Visual Swatch to Text Swatch
    9
  5. Now Text Swatch is displaying on product page
    6
  6. Change Swatch type back to Visual Swatch
    7
  7. Text Swatch is showing instead of Visual Swatch!
    6

Thanks,

Catalog WroCD Clear Description Confirmed Format is not valid Ready for Work PR Created Reproduced on 2.2.x Reproduced on 2.3.x bug report

Most helpful comment

I found out that the issue is caused because only store_id '0' is getting the right type '1', the rest of the store_id's are still on type '0', if u adjusted that to '1', it works again.

From
schermafbeelding 2018-02-06 om 08 17 09

To:
schermafbeelding 2018-02-06 om 08 16 42

All 14 comments

Hi, @Pakkapao

Thanks for reporting this issue, I have created ticket in our internal JIRA to fix it (MAGETWO-57766). This issue will be closed after fix.

Hello, did you fixed this issue?

hello,
Is there any update on this one?

+1
I've had to recreate configurable products multiple times because of this issue.
(Currently running multiple instances of 2.1.2)

Hi, I've not fixed in logic code of Magento Swatches, but I found in eav_attribute_option_swatch table
which like as below
+-----------+-----------+----------+------+---------+
| swatch_id | option_id | store_id | type | value |
+-----------+-----------+----------+------+---------+
| 11 | 9 | 0 | 1 | #000000 |
| 12 | 10 | 0 | 1 | #ff05ff |
| 13 | 11 | 0 | 1 | #33ff24 |
| 14 | 12 | 0 | 1 | #ff6600 |
| 15 | 13 | 0 | 1 | #ffffff |
| 16 | 14 | 0 | 1 | #fbff00 |
| 17 | 15 | 0 | 1 | #f20000 |
| 18 | 16 | 0 | 1 | #ababab |
| 19 | 9 | 1 | 0 | Black |
| 20 | 10 | 1 | 0 | Purple |
| 21 | 11 | 1 | 0 | Green |
| 22 | 12 | 1 | 0 | Orange |
| 23 | 13 | 1 | 0 | White |
| 24 | 14 | 1 | 0 | Yellow |
| 25 | 15 | 1 | 0 | Red |
| 26 | 16 | 1 | 0 | Gray |
+-----------+-----------+----------+------+---------+
I changed field "value" from Black, Purple ... Gray to NULL and the issue seems to be solved.
Note: option_id is same to the option_id in eav_attribute_option so, you can check which is in a same pair. Before we have a patch for this issue I hope that my tip can be helpful for others.
(My current magento version is 2.1.2)

This is still an issue in 2.1.7.

@Pakkapao, thank you for your report.
We've created internal ticket(s) MAGETWO-57766 to track progress on the issue.

I found out that the issue is caused because only store_id '0' is getting the right type '1', the rest of the store_id's are still on type '0', if u adjusted that to '1', it works again.

From
schermafbeelding 2018-02-06 om 08 17 09

To:
schermafbeelding 2018-02-06 om 08 16 42

WroCD :)

@mmularski thank you for joining. Please accept team invitation here and self-assign the issue.

I am working on this at #dmcdindia

@udayankoliya thank you for joining. Please accept team invitation here and self-assign the issue.

me and @dasharath-wagento both are checked as per given step by @Pakkapao to produce this issue but we can't reproduce it in Magento 2.2

@Pakkapao we are closing this now due to inactivity. Additionally, @udayankoliya reported that issue is no more reproducible.

Thanks

Was this page helpful?
0 / 5 - 0 ratings