ERPLY – Prestashop inventory module

We are happy to publish an updated Prestashop inventory module to synchronise products and orders between Erply and Prestashop (version 1.5.3.1). As the module is still in beta, please contact us at integrations@erply.com and we’ll give you the access and setup instructions.

This module allows two way synchronization of categories, products and customer groups. Also one way (from Prestashop to Erply) synchronization of customers, customer addresses, orders and order history. This guide details the setup and use of the Erply module.

1.   Erply – Prestashop Inventory Connector setup

To start using the module, follow the steps listed below:

Prestashop Install Module

Prestashop Install Module

1.1.   Erply module installation

Copy the Erply module to the Prestashop ‘Modules’ folder. Log in to Prestashop

administration panel and go to the ‘Modules’ page.

Prestashop Install Categories

Prestashop Install Categories

 

Choose Migration Tools module category from categories list.

prestashop-install

 

Click the Erply Synchronizer “Install” button, a „successful installation“ message appears on the Erply Synchronizer module.

1.2.   Erply module setup

Click „Configure“ on Erply Synchronizer module.

Prestashop Webstore Config

Prestashop Webstore Config

On the module page type in your Erply user credentials and save them using the “Save” button.

Prestashop Webstore Inventory

Prestashop Webstore Inventory

Before synchronising the products some settings can be made and saved.

Priority – Select which system has higher priority when same object (product, customer etc.) has been changed in both systems since last synchronization.

Default Tax – If tax value is not found in product data this value is used.

Export orders from – Initial order export will be made starting from this date.

Prestashop Inventory

Prestashop Inventory

 

To begin the synchronisation choose the synchronisation direction (from Presta to ERPLY, from ERPLY to Presta or both ways) and click the ‘Start’ button.

After the initial synchronisation use the ‘Start’ button if you wish to update existing data.

Keep in mind that Erply allows 500 API requests in an hour. If that number is exceeded, an

error message will show. In this case, return to the module page, wait for an hour and try to continue the synchronisation by clicking the ‘Start’ button.

prestashop-api

To enable automatic synchronisation cron_all.php from modul folder should be added to server’s crontab.

1.3.   Erply module synchronisation details

This module performs a two-way synchronisation of the Erply – Prestashop product categories, Erply – Prestashop customer groups and Erply – Prestashop product, so all Erply products and customers appear in Prestashop and all Prestashop products and customers appear in Erply.

In case of Erply -> Prestashop synchronisation the fields are mapped as:

1.3.1.                 Category/product group synchronisation

Erply PrestaShop
parentGroupID id_parent
name Name
showInWebshop Active

 

1.3.2.                 Product synchronisation

Erply PrestaShop
displayedInWebshop Active
name Name
added reduction_from
added reduction_from
code Reference
code2 ean13
description description_short
longdesc Description
groupID id_category
groupID id_category_default
vatrate id_tax_rules_group (local id is matched by vatrate value)
vatrate id_tax (local id is matched by vatrate value)
price Price
netWeight Weight
brandName id_manufacturer (New manufacturer is added if not found)
supplierName id_supplier (New supplier is added if missing)
supplierName supplier_name
warehouses (sum of “free” field for all warehouses) Quantity is added to product
images Images are added to product

 

1.3.3.                 Customer groups synchronisation

Erply PrestaShop
Name Name

 

The module also imports product images only from Erply to Prestashop.

Also the synchronisation module allows you to perform a one-way synchronisation of the Prestashop -> Erply customers, customer address, orders and order history, so all Prestashop customers, customer addresses, orders and order histories appear in Erply.

In case of Prestashop -> Erply synchronisation the fields are mapped as:

1.3.4.                 Customers synchronisation

Erply PrestaShop
firstName Firstname
lastName Lastname
email Email
birthday Birthday

 

1.3.5.                 Customer address synchronisation

Erply PrestaShop
typeID id from Erply API getAddressTypes response
street address1, address2
city city
postalCode postcode
country country

 

1.3.6.                 Orders synchronisation

Erply PrestaShop
id Order id if order is synced before, null otherwise
type “INVWAYBILL” is sent by default
currencyCode iso_code
date date_add
time date_add
customerID Customer id if customer is synced before, null otherwise
payerID Customer id if customer is synced before, null otherwise
addressID Address id if address is synced before, null otherwise
payerAddressID Address id if address is synced before, null otherwise
internalNotes Prestashop Invoice Number: “invoice_number”
  #productID Product id if product is synced before, null otherwise
  #itemName product_name
  #vatrateID tax_rate
  #amount product_quantity
  #price product_price
  #discount discount

*Shipping is sent as last product.

 

1.3.7.                 Order history synchronisation

All updated orders are synchronized with Erply. If order is deleted from Prestashop it is deleted from Erply also. If order is paid invoiceState is updated to “READY” with saveSalesDocument update method.

If order is paid new payment is synced to Erply with field mapping:

Erply PrestaShop
customerID clientID from Erply API getSalesDocuments response
documentID “READY” or “PENDING” depending on status
date date_add
sum Total from Erply API getSalesDocuments response
currencyCode currencyCode from Erply API getSalesDocuments response

 

 


About the author
Kristjan Hiiemaa
Entrepreneur building better POS and cloud-based retail management suite . Product guy. CEO & Founder of Erply.