yireo/Yireo_GoogleTagManager2

Missing Quantity Parameter in add_to_cart Event

Closed this issue · 1 comments

The quantity parameter for the add_to_cart event is missing.
Is there any particular reason why the below line is commented out in https://github.com/yireo/Yireo_GoogleTagManager2/blob/master/view/frontend/requirejs-config.js#L23?

/*'Magento_Catalog/js/catalog-add-to-cart': {
    'Yireo_GoogleTagManager2/js/mixins/catalog-add-to-cart-mixin': false
},*/

@amjadm61 This indeed seems to have been a miss, the quantity was simply not set in the corresponding PHP-based event class. It's now fixed in 3.4.2.

The JS is commented out because it is a lesser preferred way of dealing with the event: More data will be missing, because the mixin relies upon a certain structure in HTML. I've left it in for developers to use it, if they see fit.