File tree 1 file changed +8
-14
lines changed
app/code/Magento/Catalog/view/frontend/templates/product/view 1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change 39
39
<?= $ block ->getChildHtml ('form_bottom ' ) ?>
40
40
</form>
41
41
</div>
42
- <script>
43
- require([
44
- 'jquery',
45
- 'priceBox'
46
- ], function($){
47
- var dataPriceBoxSelector = '[data-role=priceBox]',
48
- dataProductIdSelector = '[data-product-id=<?= $ block ->escapeHtml ($ _product ->getId ()) ?> ]',
49
- priceBoxes = $(dataPriceBoxSelector + dataProductIdSelector);
50
42
51
- priceBoxes = priceBoxes.filter(function(index, elem){
52
- return !$(elem).find('.price-from').length;
53
- });
54
-
55
- priceBoxes.priceBox({'priceConfig': <?= /* @escapeNotVerified */ $ block ->getJsonConfig () ?> });
56
- });
43
+ <script type="text/x-magento-init">
44
+ {
45
+ "[data-role=priceBox][data-price-box=product-id-<?= $ block ->escapeHtml ($ _product ->getId ()) ?> ]": {
46
+ "priceBox": {
47
+ "priceConfig": <?= /* @escapeNotVerified */ $ block ->getJsonConfig () ?>
48
+ }
49
+ }
50
+ }
57
51
</script>
You can’t perform that action at this time.
0 commit comments