Magento2: configurable products throw javascript error on click

The following error was thrown when clicking on a configurable product option:

Uncaught TypeError: Cannot read property 'updateData' of undefined
at $.(anonymous function).(anonymous function).updateBaseImage (http://domain.com/pub/static/frontend/Vendor/theme/de_DE/Magento_Swatches/js/swatch-renderer.js:920:28)

Googling this problem quickly returns a hint that the parent classes must have the column and main classes. In this case, this alone wasn’t enough, the important information is, that the .column.main div must encapsule both the gallery and the text-swatch.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.