Skip to content

Commit fb91a50

Browse files
author
Mykhailo Miroshnikov
committed
MAGETWO-33947: Story stabilization
- Revert priceBox inline script removal
1 parent 7cf1aa6 commit fb91a50

File tree

1 file changed

+13
-8
lines changed
  • app/code/Magento/Catalog/view/frontend/templates/product/view

1 file changed

+13
-8
lines changed

app/code/Magento/Catalog/view/frontend/templates/product/view/form.phtml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,17 @@
3535
<?php echo $block->getChildHtml('form_bottom'); ?>
3636
</form>
3737
</div>
38-
<script type="text/x-magento-init">
39-
{
40-
"[data-role=priceBox]": {
41-
"priceBox": {
42-
"priceConfig": <?php echo $block->getJsonConfig() ?>
43-
}
44-
}
45-
}
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+
});
4651
</script>

0 commit comments

Comments
 (0)