Skip to content

Commit 5e9de4b

Browse files
committed
MAGETWO-69210: [Google Tag Manager] Ajax "Add to Cart" / "Remove from Cart" do not fire any events
1 parent 0ab31aa commit 5e9de4b

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ $_helper = $this->helper('Magento\Catalog\Helper\Output');
122122
{
123123
"[data-role=tocart-form], .form.map.checkout": {
124124
"catalogAddToCart": {
125-
"product_sku": "<?= /* @escapeNotVerified */ $_product->getSku() ?>"
125+
"product_sku": "<?= $_product->getSku() ?>"
126126
}
127127
}
128128
}

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="<?= /* @escapeNotVerified */ $_product->getSku() ?>"
20-
action="<?= /* @escapeNotVerified */ $block->getSubmitUrl($_product) ?>" method="post"
19+
<form data-product-sku="<?= $_product->getSku() ?>"
20+
action="<?= $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="<?= /* @escapeNotVerified */ $_product->getId() ?>" />
2323
<input type="hidden" name="selected_configurable_option" value="" />

app/code/Magento/Theme/view/frontend/templates/js/polyfill.phtml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
7+
/**
8+
* Polyfill for local storage and session storage for old browsers and with enabled private mode.
9+
*
10+
* Emulates behavior of the native local storage and session storage. Adds ability to use "getItem", "setItem",
11+
* "removeItem" methods.
12+
*/
613
?>
714

815
<script>

0 commit comments

Comments
 (0)