Pregunta

I need to create a module in Prestashop.

The module should have the following functionality.

1) When a user registers a account, buys a product.. etc the data should be also passed through an API to another System which has a database.

2) I have heard about the REST API of the Prestashop.

3) The main challenge is that this should all be within the scope of the Module and no core file or external file should be edited of the Prestashop.

4) Searched the internet but found no result which satisfies the requirement.

Any, Help or ideas how this can be achieved.

thanks..

¿Fue útil?

Solución

This can be achieved using Prestashop hooks, almost all actions a customer performs in front office have it's own hook, which is invoked in your module when an action is perfomed. Check Prestashop documentation on hooks

Otros consejos

In the case you describe here, you could rely on the Hook actionPaymentConfirmation. As soon as an order is placed in Prestashop and its status is set to 'Payment accepted', your module could post the order details to your system. Your Prestashop instance is then a web client to your Master system.According to me, Prestashop REST API won't help here!

You may setup your system the other way around with the REST API, but you have to check at a regular basic the status of orders, and so one.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top