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.
2 parents ea72c16 + a2ebf12 commit 6a91cc0Copy full SHA for 6a91cc0
app/code/Magento/Catalog/view/frontend/templates/product/view/form.phtml
@@ -35,17 +35,12 @@
35
<?php echo $block->getChildHtml('form_bottom'); ?>
36
</form>
37
</div>
38
-<script>
39
- require([
40
- 'jquery',
41
- 'Magento_Catalog/js/price-box'
42
- ], function($){
43
- var priceBoxes = $('[data-role=priceBox]');
44
-
45
- priceBoxes = priceBoxes.filter(function(index, elem){
46
- return !$(elem).find('.price-from').length;
47
- });
48
49
- priceBoxes.priceBox({'priceConfig': <?php echo $block->getJsonConfig() ?>});
50
+<script type="text/x-magento-init">
+ {
+ "[data-role=priceBox]": {
+ "priceBox": {
+ "priceConfig": <?php echo $block->getJsonConfig() ?>
+ }
51
</script>
0 commit comments