Jump to content
anis42

[Prestashop 1.7] Search for a product in another database.

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

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