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