Jump to content

How to trace if a product is back in stock


Recommended Posts

I am planning to build a module that some actions will be taken after a product is back in stock (i.e. Quantity modified from 0 to >0)

However, I have checked the list of hooks in PrestaShop Document and seems there is no such hook..

Can anyone give me some idea on this please?

Edited by oliver139 (see edit history)
Link to comment
Share on other sites

1 minute ago, joseantgv said:

Check hookActionUpdateQuantity.

Yeah, I saw this, but I think this is a bit different, where any quantity update will trigger this hook, right?

However, I only want to check for back in stock. I have considered to check for both old quantity & new quantity, but this hook only provide the new qunantity..

Link to comment
Share on other sites

En 16/4/2021 a las 10:59 AM, oliver139 dijo:

Yeah, I saw this, but I think this is a bit different, where any quantity update will trigger this hook, right?

However, I only want to check for back in stock. I have considered to check for both old quantity & new quantity, but this hook only provide the new qunantity..

Then probably you will need to save the old value in another table.

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...