Sandeep Tiwari Posted December 15, 2014 Share Posted December 15, 2014 Hello Everyone I need a help. I am creating a module whenever a new product is created then I also have to update my another store using third party API. A new product is added using the class Product.php so my idea is to call a hook from Product.php to my custom module . Whenever a new product is added then a function is called by a custom hook where I will run my API to update the new product on another store. Flow is clear but I do not want to add Hook::execute in Product.php file because it may override in future if my clients upgrade prestashop version. How to customize Product.php class for my custom module ? Regards, Sandeep Link to comment Share on other sites More sharing options...
Eolia Posted December 15, 2014 Share Posted December 15, 2014 Hi ! You can use the action hook: actionObjectProductAddAfter Link to comment Share on other sites More sharing options...
Sandeep Tiwari Posted December 15, 2014 Author Share Posted December 15, 2014 Thank you , i will try. I think similarly in other cases like deleting products,updating product, updating order status. I have to use different hooks as per requirements. 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