Jump to content

Which hook reliably triggers on "Add to Cart" [PS8/9]


DARKF3D3

Recommended Posts

Hi everyone,
I'm developing a custom module that tracks product views, sales, and add-to-cart events to calculate dynamic relevance scores.

The goal is to increment a counter every time a product is added to the cart.

I've already tried the following hooks:
actionObjectCartAddAfter → only triggers when the cart is first created (i.e. first product added)
actionCartSave → doesn't trigger on AJAX add-to-cart
actionCartUpdateQuantityAfter → never triggered during cart updates
actionProductAddToCartLinkAfter → never triggered either

None of these hooks seem to fire consistently when a product is added to the cart.

Is there a hook in PrestaShop 8/9 that is triggered every time a product is added to the cart?

Thanks in advance!

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...