1.0.3

, image
, image

Table of contents

Table of contents

Integration with LitRes service

Flexible integration with the book marketplace. Create your own bookstore..

Setting

After the add-on is installed, in the add-on settings on the Settings → Connection tab you should specify the data for work received from the Litres service or check the Test mode to check the work of the add-on

Image

Next, you need to create a category for books and characteristics for products in this category. They have certain requirements (described in more detail in the settings)

Image

After that, for the initial synchronization you need to run the script once at [domain_site]/admin.php?dispatch=ms_litres_integration.get_genres_list to get the list of genres

After executing it, let's run the script

[domain_site]/admin.php?dispatch=ms_litres_integration.get_fresh_book&from=2013-01-01&days=1  to get books

For automatic synchronization in the future, we add to cron running the script [domain_site]/admin.php?dispatch=ms_litres_integration.get_genres_list once every 14 days. And the [domain_site]/admin.php?dispatch=ms_litres_integration.get_fresh_book&minutes=15 script every 15 minutes.

After that, we will choose the order status, at the occurrence of which we will notify about the completion of the purchase to the Litres side. Go to Administration → Statuses → Order Statuses and select the desired status

Image

And in his settings check the box Send request to LitRes for sale

Image

And in the settings of the add-on itself, let's select the status to which the order will go if it is rejected by Litres

Image

attachmentПрикрепить файлы