Open ADDISON74 opened 1 year ago
I've noticed this bug too and I can confirm copying the template . files from rwd/configurableswatches to base/configurableswatches will solve this issue.
configurableswatches javascripts are written for jquery and the base theme doesn't have jquery so... if we move js/templates from the rwd theme to base it won't work.
all of the configurableswatches js should be rewritten to vanilla javascript and we already know how hard that will me.
or we should add jquery to the base...
unless we do one of those two options we can't move the templates to the base package
In my case it worked because the custom theme used loads jQuery. Personal opinion, we should not complicate things and add jQuery to the base theme if the respective module is enabled.
Analyzing this issue better, see how I would proceed. I would copy all template files related to configurableswatches in base. In the Backend, in the "Configurable Swatches" section, next below the activation selector, I would put a warning.
If you use a theme other than RWD, add the jQuery link to the template file named ... by yourself. In addition to the warning, we also make an explanatory paragraph in the Readme.
It is an elegant solution because many custom themes that use files from /base directory already use jQuery (it is my case). There is practically no need to add the library.
The color swatch feature only works with the RWD theme. It cannot be used with other custom themes unless files are added manually to the base directory so that they can be found by Magento fallback. The issue is solved by copying the specific directories from the rwd directory into base. I would choose to move this directory.
To test this issue visit a configurable product in the default RWD theme, then change the package in Backend to default. The color swatches block has been replaced with options as in the case of simple products.