We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9251ed4 commit f2737c7Copy full SHA for f2737c7
app/code/Magento/ConfigurableProduct/view/frontend/templates/product/view/type/options/configurable.phtml
@@ -29,9 +29,11 @@ $_attributes = $block->decorateArray($block->getAllowAttributes());
29
</div>
30
31
<?php endforeach; ?>
32
- <script>
33
-require(["jquery", "Magento_ConfigurableProduct/js/configurable"], function($){
34
- $('#product_addtocart_form').configurable({"spConfig":<?php echo $block->getJsonConfig() ?>});
35
-});
36
-</script>
+ <script type="text/x-magento-init">
+ "#product_addtocart_form": {
+ "configurable": {
+ "spConfig": <?php echo $block->getJsonConfig() ?>
+ }
37
38
+ </script>
39
<?php endif;?>
0 commit comments