I know this is probably a duplicated, but I read ALL the posts about this issue and I still didn't figure it out.

So, I have attribute size (dropdown) and attribute color (swatches). What I want is to change the picture based on the selection of the attributes.

The result is that Magento loads me the default picture.

I cleared the cache and I did a re-index, but the problem still persists.

Any suggestions?

Here is the screenshot


Here is the configuration I have on the back-end



Here is the error that I got:

TypeError: this.options.jsonConfig.mappedAttributes is undefined swatch-renderer.js:772:29
    _getAttributeCodeById https://webiste.com/pub/static/version1576523586/frontend/Mgs/amely/en_US/Magento_Swatches/js/swatch-renderer.js:772
    $.widget/</proxiedPrototype[prop]</< jQuery
    _OnClick https://webiste.com/pub/static/version1576523586/frontend/Mgs/amely/en_US/Magento_Swatches/js/swatch-renderer.js:738
    $.widget/</proxiedPrototype[prop]</< jQuery
    _EventListener https://webiste.com/pub/static/version1576523586/frontend/Mgs/amely/en_US/Magento_Swatches/js/swatch-renderer.js:640
    jQuery 2

PS, I'm using Magento 2.3.3

Thanks in advance!

  • Please write all the configuration you have done. Dec 13, 2019 at 15:23
  • just updated my answer Dec 13, 2019 at 15:42
  • you have to add different images for you simple products of configurable product then it will appear on your selection Dec 13, 2019 at 15:43
  • well, that's what I did. All the products have different pictures Dec 13, 2019 at 15:52
  • any suggestions? Please! Dec 13, 2019 at 18:31


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.