Example 5 - Exporting to a Database

In addition to exporting information, our SDK can send this information to a database through the SalesLayer_Updater () class. The SalesLayer_Updater () class is an extended class of the SalesLayer_Conn () class. It adds the necessary functions to export the schema of the fields belonging to a connector in Sales Layer and creates the tables and fields in the chosen database.

Related Products

To send the PrestaShop related product field, just fill in the Accessories field in the products table with a Related Item field.

Product Redirection

It is possible to redirect our items, when they are deactivated in the store, creating some specific ields in the connector. 

Example 4 - Pagination

Starting with version 1.18 of the API, it is possible to export data through a paging system. In this way, the products will be sent in blocks by predefined quantity (page) and not all at the same time as before.

Example 3 - Optional API Parameters

In this third example about the export of items using the SDK, we will do an export with some of these optional parameters allowed by the API. These parameters influence the export of data from the API to the type of value passed in the parameter.

Example 2 - The Last Update Parameter

This example is about the usage of the last_update parameter. By using this parameter you ask the API to return the items modified on the platform after a certain date.

Example 1 - Simple Export

This first example shows the simple export through the Api of all the items in visible status from the PIM account.