TonyKapa Posted May 30, 2022 Share Posted May 30, 2022 Hello ! I am implementing Google analytics 4 in my shop. I am sending data to a front controller, then grabbing them with ajax to my javascript file and then firing the event google needs. As the title says I cant figure out how to get the data from last product that got deleted/removed from cart so I can do what I want with it's data. Is there any function like getLastProduct() -which returns only the last product added- or how can I do this? Thanks in advance! Link to comment Share on other sites More sharing options...
Tom Girou Posted June 1, 2022 Share Posted June 1, 2022 Hello, There's a hook called actionObjectProductInCartDeleteBefore that is executed before the deletion of a product inside the cart. From it, you have access to the product ID so could retrieve the whole product information. Is it what you need ? 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now