Skip to content

Commit b589d96

Browse files
author
Mykhailo Miroshnikov
committed
MAGETWO-33502: Story stabilization
- Remove priceBox inline script
1 parent 6e21c8d commit b589d96

File tree

1 file changed

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

1 file changed

+8
-13
lines changed

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

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

0 commit comments

Comments
 (0)