magento 2 show attribute value in one block per selected dropdown configurable products

Viewed 44

We have configurable products with dropdown options. Dropdown options of a configurable product contain the labels of child product. For example:

30"W X 30"H
30"W X 42"H
48"W X 30"H
60"W X 30"H

What I am trying to achieve: Anytime one item is selected, one block under the selected item show up and show the lead time in this block.

What I am doing:

  1. Added one block called "leadTime" to app/design/frontend/Fallback/default/Magento_ConfigurableProduct/templates/product/view/type/options/configurable.phtml

    getAttributeId() ?>]" data-selector="super_attribute[getAttributeId() ?>]" data-validate="{required:true}" id="attributegetAttributeId() ?>" class="super-attribute-select"> getAttributeId() ?>" style="display: none;">Show Lead Time!!!
  2. Edit code of app/design/frontend/Fallback/default/Magento_ConfigurableProduct/web/js/configurable.js to show value of attribute of leadtime in the block above.

Could anybody give me a hint how to solve this task?

Thanks a lot for your help!

0 Answers
Related