Jump to content

A hook for stock value change


Gabriel Crowe
 Share

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?

Share this post


Link to post
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

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More