How I can change my configurable product name and description dynamically when one option is selected, right now is change only the image, I need to do the same with the name and description.
HTML structure:
<div class="product media">
<div class="product attribute description">
<div class="value">
<p>text description.</p>
</div>
</div>
</div>
Best Answer
You can try below custom module and modify according to your requirement.
app/code/Anshu/SCdata/registration.php
app/code/Anshu/SCdata/etc/module.xml
app/code/Anshu/SCdata/etc/frontend/di.xml
app/code/Anshu/SCdata/Block/ConfigurableProduct/Product/View/Type/Configurable.php
app/code/Anshu/SCdata/view/frontend/requirejs-config.js
app/code/Anshu/SCdata/view/frontend/web/js/swatch-renderer.js