Skip to content

Magento 2 – Get qty from ajax response add to cart post parameters

When click in add to cart button in view page product, with ajax response get in checkout/cart/add the qty added, i need this qty value for datalayer push in phtml, i tried getAddToCartPostParams method but not work, any ideas?

enter image description here

enter image description here