On my clothing store, when I enter on product page of a configurable item, I need to auto-select the first option for color (swatch attribute).

I found this solution: How to make auto select first child product of configurable product in magento2?

BUT don't works on Magento 2.3.4 because this file was removed! --> module-swatches/view/frontend/web/js/SwatchRenderer.js

Anyone can help me?

  • Refer this magento.stackexchange.com/questions/189088/… – Lokesh Naik Oct 16 '20 at 4:45
  • As written, "SwatchRenderer.js" was removed on magento 2.3.4 ! – Silver Oct 17 '20 at 20:12
  • Yes but there is a new file vendor/magento/module-configurable-product/view/frontend/web/js/configurable.js. Check above link. – Lokesh Naik Oct 21 '20 at 14:08
  • Just tried but nothing happens on my magento 2.3.4 – Silver Oct 22 '20 at 16:22

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.