Jump to content

A hook for stock value change


Gabriel Crowe

Recommended Posts

Hi everyone. I'm looking for a hook that I can use in a module that triggers when somebody adds more stock to their store.

 

Hopefully i can get the SKU/reference of the item too. This is the value I need.

 

I'm writing an API to connect to a new service i'm writing that lets presta people send email notifications to people who requested to be notified about new stock on items.

 

The service is nearly complete, and i'm going around and writing plugins for the stores i'm familiar with first. The plugin so far looks great on a default store:

 

2JlGfjZ.png

 

Now the only missing part of my module, is automatically triggering notifications when the user of the store puts their stock into the backend.

 

Can anybody help?

Link to comment
Share on other sites

Hi Gabriel,

in Stockavailable.php, I found this:

 

$product_quantity += $quantity;
 
Hook::exec('actionUpdateQuantity',
array(
'id_product' => $id_product,
'id_product_attribute' => $id_product_attribute,
'quantity' => $quantity
)
);
 
 
May be something...
pascal
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...