File tree Expand file tree Collapse file tree 1 file changed +8
-14
lines changed
app/code/Magento/Catalog/view/frontend/templates/product/view Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change 3939 <?= $ block ->getChildHtml ('form_bottom ' ) ?>
4040 </form>
4141</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);
5042
51- priceBoxes = priceBoxes.filter(function(index, elem){
52- return !$(elem).find('.price-from').length;
53- });
54-
55- priceBoxes.priceBox({'priceConfig': <?= /* @noEscape */ $ 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": <?= /* @noEscape */ $ block ->getJsonConfig () ?>
48+ }
49+ }
50+ }
5751</script>
You can’t perform that action at this time.
0 commit comments