Skip to content

Commit ffaab2b

Browse files
committed
MAGETWO-70892: [Backport] - [Google Tag Manager] Ajax "Add to Cart" / "Remove from Cart" do not fire any events - for 2.1
1 parent 72b3c46 commit ffaab2b

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

app/code/Magento/Catalog/view/base/templates/product/price/configured_price.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ $priceLabel = ($block->getPriceLabel() !== null)
1717
: '';
1818
?>
1919
<p class="price-as-configured">
20-
<?php if ($configuredPrice->getValue() !== 0): ?>
20+
<?php if ($configuredPrice->getAmount()->getValue() !== null): ?>
2121
<?php /* @noEscape */
2222
echo $block->renderAmount($configuredPrice->getAmount(), [
2323
'display_label' => $priceLabel,

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ $_helper = $this->helper('Magento\Catalog\Helper\Output');
7878
<div class="actions-primary"<?php echo strpos($pos, $viewMode . '-primary') ? $position : ''; ?>>
7979
<?php if ($_product->isSaleable()): ?>
8080
<?php $postParams = $block->getAddToCartPostParams($_product); ?>
81-
<form data-role="tocart-form" data-product-sku="<?php /* @escapeNotVerified */ echo $_product->getSku() ?>"
82-
action="<?php /* @escapeNotVerified */ echo $postParams['action']; ?>" method="post">
81+
<form data-role="tocart-form" data-product-sku="<?php echo $block->escapeHtml($_product->getSku()); ?>"
82+
action="<?php echo $block->escapeHtml($postParams['action']); ?>" method="post">
8383
<input type="hidden" name="product" value="<?php /* @escapeNotVerified */ echo $postParams['data']['product']; ?>">
8484
<input type="hidden" name="<?php /* @escapeNotVerified */ echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php /* @escapeNotVerified */ echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
8585
<?php echo $block->getBlockHtml('formkey')?>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
<?php $_product = $block->getProduct(); ?>
1717

1818
<div class="product-add-form">
19-
<form data-product-sku="<?php /* @escapeNotVerified */ echo $_product->getSku() ?>"
20-
action="<?php /* @escapeNotVerified */ echo $block->getSubmitUrl($_product) ?>" method="post"
19+
<form data-product-sku="<?php echo $block->escapeHtml($_product->getSku()) ?>"
20+
action="<?php echo $block->escapeHtml($block->getSubmitUrl($_product)) ?>" method="post"
2121
id="product_addtocart_form"<?php if ($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>
2222
<input type="hidden" name="product" value="<?php /* @escapeNotVerified */ echo $_product->getId() ?>" />
2323
<input type="hidden" name="selected_configurable_option" value="" />

app/code/Magento/ConfigurableProduct/Block/Product/View/Type/Configurable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ public function getJsonConfig()
236236
*
237237
* @return array
238238
*/
239-
protected function getOptionImages()
239+
private function getOptionImages()
240240
{
241241
$images = [];
242242
foreach ($this->getAllowProducts() as $product) {

0 commit comments

Comments
 (0)