Skip to content

Commit

Permalink
MAGETWO-53135: [GITHUB] Prices of related products on PDP changes acc…
Browse files Browse the repository at this point in the history
…ording to product custom options. #4588

- Merge commit
  • Loading branch information
xmav committed Aug 26, 2016
2 parents bc45381 + 1bfe961 commit ddf5f8d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
'jquery',
'priceBox'
], function($){
var priceBoxes = $('[data-role=priceBox]');
var dataPriceBoxSelector = '[data-role=priceBox]',
dataProductIdSelector = '[data-product-id=<?php echo $block->escapeHtml($_product->getId())?>]',
priceBoxes = $(dataPriceBoxSelector + dataProductIdSelector);

priceBoxes = priceBoxes.filter(function(index, elem){
return !$(elem).find('.price-from').length;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
?>

<?php $_options = $block->decorateArray($block->getOptions()) ?>
<?php $_productId = $block->getProduct()->getId() ?>
<?php if (count($_options)):?>
<script type="text/x-magento-init">
{
"#product_addtocart_form": {
"priceOptions": {
"optionConfig": <?php /* @escapeNotVerified */ echo $block->getJsonConfig()?>,
"controlContainer": ".field",
"priceHolderSelector": "[data-role=priceBox]"
"priceHolderSelector": "[data-product-id='<?php echo $block->escapeHtml($_productId)?>'][data-role=priceBox]"
}
}
}
Expand Down

0 comments on commit ddf5f8d

Please sign in to comment.