Integration with the LitRes service
This add-on is part of our Subscription plan.
Subscribe once — enjoy all add-ons without limits.
The add-on helps connect CS-Cart with LitRes: it imports books, matches genres and features, delivers digital files to buyers, and automatically notifies LitRes about a sale.
What it is for
- build a book catalog based on LitRes;
- import books and updates into CS-Cart;
- connect LitRes genres with store categories;
- give buyers file access after purchase;
- automatically notify LitRes about a sale through the order status.
Key features
- import fresh books by work type and update period;
- create and update genre categories from LitRes;
- map author, series, series number, and ISBN to CS-Cart features;
- assign a seller who will own the imported products;
- deliver files through the standard CS-Cart digital goods flow;
- use test mode to check the integration without live requests.
How it works
1. The add-on gets data from LitRes using the connection keys and test mode.
2. It creates or updates books, genres, and service data in CS-Cart.
3. After payment, the order can send a sale notification to LitRes.
4. The buyer gets access to the book files through the built-in digital goods delivery.
Have questions about the add-on?
- Store Builder
- Store Builder Ultimate
- Multi-Vendor
- Multi-Vendor Plus
- Multi-Vendor Ultimate
- Owners
- English
- Русский
- 4.20
- 4.19.X
- 4.18.X
- 4.17.X
- 4.16.X
- 4.15.X
- 4.14.X
- 4.13.X
- 4.12.X
Module instructions: Integration with the LitRes service
What the add-on does
The add-on works with the LitRes book catalog and lets you:
- import genres and books into CS-Cart;
- create and update digital products from LitRes data;
- map genres, author, series, series number, and ISBN to store features;
- deliver files to the buyer after payment;
- send a sale notification to LitRes through the order status;
- run updates for fresh books by type and by period.
Where to find it
In the admin panel, go to Add-ons → Manage add-ons → Integration with the LitRes service.
The settings are split into these sections:
- Connection,
- General,
- Launch information.
A separate setting for sale notifications is available under Administration → Orders → Order statuses. For the required status, enable Send request to LitRes about a sale.
Before first use, make sure digital products are enabled in CS-Cart. Without that, the add-on will not install.
Connection
On the Connection tab, enter:
- Partner ID;
- Secret key;
- Notification secret key;
- Download domain;
- Order status for failed sale rejection;
- Test mode.
In test mode, the add-on uses LitRes test requests and helps you check the flow without live notifications.
General settings
On the General tab, set up the links to the LitRes catalog:
- Category for the LitRes genre tree. Genres will be imported there.
- Author. Choose a feature of type Checkbox group.
- Series. Choose a feature of type Text or number.
- Series number. Choose a feature of type Text or number with the correct role on the feature card.
- ISBN. Choose a feature of type Text or number with the correct role on the feature card.
- Vendor. Choose the vendor who will own the imported products.
Launch information
This block contains separate pages for working with LitRes data.
Update the genre list
To load genres, open:
admin.php?dispatch=ms_litres_integration.get_genres_list
This page:
- loads the LitRes genre tree;
- creates or updates categories in the selected parent category;
- uses the vendor selected in the settings.
Update products
To load fresh books, open:
admin.php?dispatch=ms_litres_integration.get_fresh_book
Supported parameters:
- product_type, work type;
- from, date in YYYY-MM-DD format;
- days, interval in days;
- minutes, interval in minutes.
If product_type is not passed, the add-on updates types 0, 1, and 11.
If from is provided, the add-on splits the period into intervals and requests updates in parts.
Working with products
After import, a book becomes a standard CS-Cart digital product:
- LitRes data is filled in on the product;
- book files are created or updated;
- on the storefront, the file link is replaced with a LitRes download address;
- the download count is limited by the file setting.
Sale notification
To make LitRes receive a sale signal:
1. Open the required order status.
2. Enable Send request to LitRes about a sale.
3. Move the order to this status after payment.
If LitRes returns an error, the add-on will move the order to the status from Order status for failed sale rejection.
How to check it
1. Enable digital products in CS-Cart.
2. Fill in the LitRes connection settings.
3. Choose the genre category, features, and vendor.
4. Run the genre update.
5. Run the product update.
6. Check the imported book card and the download file.
7. Move a test order to a status with the LitRes sale request enabled.
8. Make sure the buyer sees the file and the order follows the expected notification flow.
Change history
v1.0.4 from 2023-08-03
[*] Replaced short <? tags with standard <?php tags
v1.0.3 from 2022-12-26
[+] Module standardization
v1.0.2 from 2022-10-09
[+] Module standardization
v1.0.1 from 2022-07-18
[*] Module code standardization
v1.0.0 from 2021-11-10
[+] First release
Legend:
[+] Added
[-] Removed
[*] Changed
[!] Bug fix
Here you can share your opinion and evaluate our work.
Your feedback helps us become better and offer you even better service.