Skip to content

Commit 5cd9c46

Browse files
author
Stanislav Idolov
authored
ENGCOM-736: Use event object in 'ajax:addToCart' trigger when adding a product to the cart #13956
2 parents ea9d6fa + 360c7a9 commit 5cd9c46

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ define([
9797
success: function (res) {
9898
var eventData, parameters;
9999

100-
$(document).trigger('ajax:addToCart', form.data().productSku, form, res);
100+
$(document).trigger('ajax:addToCart', {
101+
'sku': form.data().productSku,
102+
'form': form,
103+
'response': res
104+
});
101105

102106
if (self.isLoaderEnabled()) {
103107
$('body').trigger(self.options.processStop);

0 commit comments

Comments
 (0)