Synchronization

The PrestaShop plugin synchronization works as follows:

  • First of all, the plugin asks Sales Layer for the items that need to be synchronized. These items will be saved in the client's server database. The info corresponds to the raw data that has to be synchronized.
  • Later, the plugin will start collecting the items from the local database. After processing them, the plugin will remove them from the raw data that is pending to be updated.

 

Important

 

Bear in mind that, starting with version 1.5.0 of the plugin, the progress bar groups the products to be updated together with their variants. This means that they are no longer counted individually as in previous versions. When synchronizing a product, the progress bar increases by one unit but also includes the synchronization of its variants. Due to this change, the customers who have used previous versions of the plugin might have the perception that the progress bar progresses more slowly.

 

Synchronization status

 

In the Connectors tab of the Sales Layer plugin for PrestaShop, you will find the synchronization progress bar. It shows the synchronization status, the progress percentage, the number of items to be synchronized, and the number of synchronization processes that are running in parallel.

 

Process types

 

The plugin groups different types of data to optimize synchronizations. There are multiple definitions of an independent item.

  • Categories to remove
  • Products to remove
  • Variants to remove
  • Created or updated categories
  • Grouped products with their variants, to be created or updated
  • Orphaned variants (without product in Sales Layer)
  • Set of images to be stored or updated (max. 7,000 images in one process).
  • Items whose only change is the stock field.

For example, if we have 10 categories pending deletion and 3 categories to be created, the progress bar will show a total of 13 items.

Additionally, starting with version 1.5.3, the plugin will include information about the upload of the images to be synchronized or the indexing tasks in the same progress bar.

Warning: In versions before 1.5.0, the plugin does not group products with variants in the same item. As a result, if you migrate from a version before 1.5.0, you might have the perception that the progress bar is slower.

 

Parallelization of synchronization processes

 

The plugin takes advantage of the different types of data to group the info to be synchronized. Thus, the plugin can have the following processes:

 

  • A process to manage the items to be removed.
  • A process for managing items to be created or updated.
  • A process to manage the images to store or update (in sets of max. 7000 images).
  • A process to manage the editing of items whose only change involved the "stock" field.

 

Multiple execution of synchronization processes

 

To sync items faster, the plugin has introduced several improvements that will help optimize the sync speed:

  • Version 1.5.0 has introduced the asynchronous processing of the items.
  • Thanks to this asynchronous processing, the plugin can execute several processes simultaneously and thus gain processing speed.
  • Dynamic calculation of the number of processes that are executed: this calculation is obtained from the current CPU load. As a result, if the CPU is not heavily loaded, the balancer creates processes and catches up with them.

 

Note: The number of processes that are currently running is shown in the progress bar itself. In the example below, “2x” indicates that there are two active processes.

 

1