File tree 2 files changed +5
-2
lines changed
app/code/Magento/Catalog/view/frontend/templates/product/view
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 42
42
'jquery',
43
43
'priceBox'
44
44
], function($){
45
- var priceBoxes = $('[data-role=priceBox]');
45
+ var dataPriceBoxSelector = '[data-role=priceBox]',
46
+ dataProductIdSelector = '[data-product-id=<?php echo $ block ->escapeHtml ($ _product ->getId ())?> ]',
47
+ priceBoxes = $(dataPriceBoxSelector + dataProductIdSelector);
46
48
47
49
priceBoxes = priceBoxes.filter(function(index, elem){
48
50
return !$(elem).find('.price-from').length;
Original file line number Diff line number Diff line change 10
10
?>
11
11
12
12
<?php $ _options = $ block ->decorateArray ($ block ->getOptions ()) ?>
13
+ <?php $ _productId = $ block ->getProduct ()->getId () ?>
13
14
<?php if (count ($ _options )):?>
14
15
<script type="text/x-magento-init">
15
16
{
16
17
"#product_addtocart_form": {
17
18
"priceOptions": {
18
19
"optionConfig": <?php /* @escapeNotVerified */ echo $ block ->getJsonConfig ()?> ,
19
20
"controlContainer": ".field",
20
- "priceHolderSelector": "[data-role=priceBox]"
21
+ "priceHolderSelector": "[data-product-id=' <?php echo $ block -> escapeHtml ( $ _productId ) ?> '][data- role=priceBox]"
21
22
}
22
23
}
23
24
}
You can’t perform that action at this time.
0 commit comments