anis42 Posted January 24, 2019 Share Posted January 24, 2019 Hi,I would like to create a module, or maybe edit the file to order,so that when ordering a customer, if a product is not available in my stock, it will automatically search for it in the stock of one of my supplier, via their api they have provided me, without it being perceptible by the customer.I managed to create a small program to retrieve all of their items through their api, apparently advanced stock management could do that but is no more available in prestashop 1.7.5. I don’t see how I can use this to automatically search in their database if a product is no longer in stock in mine.I’m a beginner in development. Thanks and sorry for my bad english. Link to comment Share on other sites More sharing options...
Krystian Podemski Posted January 26, 2019 Share Posted January 26, 2019 Uhhh, you know, it's tricky, you need to do it legally so the person who is buying something is aware of these changes. I suggest to modify CartController.php, there are methods to check wether product is in stock or not, alter those methods to create API call when products are out of stock and put in cart different one... but you have to inform customers about these changes Link to comment Share on other sites More sharing options...
N3OGeorgy Posted October 3, 2019 Share Posted October 3, 2019 Hello, I have almost the same problem. What i understand from @anis42 is that he doesn't want to change the product. He only wants to check the stock for that product in his supplier, if in the shop is out of stock, through an API. It is possible do do this in a module ? @anis42, did you solve your problem? Thank you 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