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/… Commented Oct 16, 2020 at 4:45
  • As written, "SwatchRenderer.js" was removed on magento 2.3.4 !
    – Silver
    Commented Oct 17, 2020 at 20:12
  • Yes but there is a new file vendor/magento/module-configurable-product/view/frontend/web/js/configurable.js. Check above link. Commented Oct 21, 2020 at 14:08
  • Just tried but nothing happens on my magento 2.3.4
    – Silver
    Commented Oct 22, 2020 at 16:22


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.