EMDI is seamlessly integrated with any e-shop or external database by downloading plain text files delimited with question marks (csv). It is worth noting that the following process is not necessary as there are ready-made PHP bridges available for various e-commerce platforms, such as OpenCart, CS-Cart, Magento, and WordPress. These pre-built bridges provide an effortless solution to connect EMDI with your specific e-shop, saving you time and effort that would otherwise be required for developing a custom solution. You can download the ready-made e-shop bridges here for each respective platform.
https://www.sbzsystems.com/software-en/emdi-commercial-management/support-emdi-commercial-management/settings/e-shop-bridges/
Bridge for e-shop connection
An example of the files needed to be produced by your e-shop are:
orderlist | https://www.domain.com/neworders.asp |
selectedorder | https://www.domain.com/neworder.asp?id= |
confirmorder | https://www.domain.com/orderok.asp?docid=#docid&shipcomp=#shipcomp&voucherno=#voucherno&orderid= |
cancelorder | https://www.domain.com/cancelorder.asp?orderid= |
modifiedcustomers | https://www.domain.com/newclients.asp |
customersconfirm | https://www.domain.com/allclientsok.asp |
modifiedproducts | https://www.domain.com/newproducts.asp |
productsconfirm | https://www.domain.com/allproductsok.asp |
productavailability | https://www.domain.com/changequantity.asp?id= |
quantityvariable | &quantity= |
resetdates | |
uploadproduct | |
uploadcustomer | |
redirect |
orderlist
The link produces a csv list containing the orders. Each line is an order.
File Format products order (the order of the fields must not be changed. The first line is ignored.):
1 |
ORDER ID;CUSTOMER ID;SHIPPING COST;PAYMENT COST;DISCOUNT;DATE;NOTE;USER;VOUCHER;STATUS;SHIPPING CUSTOMER ID;PAYMENT METHOD;SHIPPING METHOD;DOCUMENT;CUSTOM FIELD 1;CUSTOM FIELD 2;CUSTOM FIELD 3;CUSTOM FIELD 4;CUSTOM FIELD 5;<br>\n |
example:
1 2 3 4 |
ORDER ID;CUSTOMER ID;SHIPPING COST;PAYMENT COST;DISCOUNT;DATE;NOTE;USER;VOUCHER;STATUS;SHIPPING CUSTOMER ID;PAYMENT METHOD;SHIPPING METHOD;DOCUMENT;CUSTOM FIELD 1;CUSTOM FIELD 2;CUSTOM FIELD 3;CUSTOM FIELD 4;CUSTOM FIELD 5;<br>\n 405; C209; 0; 0; 0; 01/12/2011 21:40:20;<br>\n 407; C215; 0; 0; 0; 02/12/2011 23:18:35;<br>\n 416; C209; 0; 0; 0; 06/12/2011 20:50:32;<br>\n |
If the “CUSTOMER ID” is not associated with the EMDI customer list then the association is based on the VAT ID contained in the “NOTE” field. Also based on the “USER” field, EMDI automatically sets the user.
Also, if “PAYMENT COST” is 0.01 then the payment cost line in EMDI is normally entered at zero price.
In the new Status field you specify which will be saved in the settings->E-shop connection->Status field in field.
confirmorder
orderid | E-shop’ s order number |
shipcomp | Shipping method |
voucherno | Tracking number |
docid | Document line ID. The document line number is sent by EMDI. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
if ($action == 'confirmorder') { $orderid = $_REQUEST['orderid']; $voucherno = $_REQUEST['voucherno']; $shipcomp = $_REQUEST['shipcomp']; $docid = $_REQUEST['docid']; ... if ($docid == 123) { ... } else { ... } ... } |
cancelorder
Informs the e-shop that the order canceled. Thus, only the outstanding ones appear in the EMDI order list. EMDI sends the order number.
selectedorder
File format orders (the order of the fields must not be changed. The first line is ignored.):
1 |
PRODUCT ID;DESCRIPTION 1;DESCRIPTION 2;DESCRIPTION 3;QUANTITY;MEASUREMENT UNIT;PRICE;TAX;DISCOUNT;START DATE;END DATE;POSITION;ORDER ID;<br>\n |
example:
1 2 3 4 |
PRODUCT ID;DESCRIPTION 1;DESCRIPTION 2;DESCRIPTION 3;QUANTITY;MEASUREMENT UNIT;PRICE;TAX;DISCOUNT;START DATE;END DATE;POSITION;ORDER ID;<br>\n 6314;CUP;WHITE;12,5hx19,5d;1;PIECES;9,50;19;0;<br>\n 6307;CUP;BLUE;LARGE;1;PIECES;15,00;19;0;<br>\n 6231;ORANGE;ORANGE;15hx15d;2;PIECES;8,00;19;0;<br>\n |
The discount is a percentage.
modifiedcustomers
Customer file format (the order of the fields must not be changed. The first line is ignored.):
1 |
CUSTOMER ID;FIRST NAME;LAST NAME;ADDRESS;ZIP;COUNTRY;CITY/STATE;AREA;PHONE;MOBILE;EMAIL;VAT;TAX OFFICE;COMPANY;OCCUPATION;LANGUAGE;PO BOX;<br>\n |
example:
1 2 3 |
CUSTOMER ID;FIRST NAME;LAST NAME;ADDRESS;ZIP;COUNTRY;CITY/STATE;AREA;PHONE;MOBILE;EMAIL;VAT;TAX OFFICE;COMPANY;OCCUPATION;LANGUAGE;PO BOX;<br>\n C62; SOLON; ZENETZIS; Plapouta 10; 16777; GR; ATTICA; GREEK; 2109648161; 6944777777; host@sound.gr; 045313872; ARGYROUPOLIS; SOLON ZENETZIS; SOFTWARE SERVICES; GR;<br>\n C77; COSTAS; PAPADOPOULOS; PARASKEVOPOULOU 38; 16777; GR; ATTICA; ARGYROUPOLI; 2109648161; 6944777777; sound@sound.gr; 045313872; GLYFADA; Kostas Papadopoulos; TRADE; GR;<br>\n |
In order to be submited, the country must follow the official alpha-2 coding.
modifiedproducts
File Format products (the order of the fields must not be changed. The first line is ignored.):
1 |
PRODUCT ID;DESCRIPTION1;DESCRIPTION2;TAX;PRICE;PURCHASE PRICE;AVAILABILITY;MEASUREMENT UNIT;CATEGORY;PHOTO;URL;CATEGORY ORDER;WEIGHT;ACTIVE;<br>\n |
example:
1 2 3 4 5 |
PRODUCT ID;DESCRIPTION1;DESCRIPTION2;TAX;PRICE;PURCHASE PRICE;AVAILABILITY;MEASUREMENT UNIT;CATEGORY;PHOTO;URL;CATEGORY ORDER;WEIGHT;ACTIVE;<br>\n P1;round pork pie;;23.00;1.80;;;Piece;Skewers with pie;<br>\n P2;chicken pita round;;23.00;2.00;;;Piece;Skewers with pie;<br>\n P3;straw pork pie;;23.00;1.80;;;Piece;Skewers with pie;<br>\n P4;skewer chicken pie;;23.00;2.00;;;Piece;Skewers with pie;<br>\n |
In “PRICE” you can include up to 4 pricelist prices:
1 |
|Pricelist Line ID 1:Price 1|Pricelist Line ID 2:Price 2|Pricelist Line ID 3:Price 3|Pricelist Line ID 4 :Price 4 |
So, in case that you want to include 1 additional price, the above example is modeled as follows:
1 2 3 4 5 |
PRODUCT ID;DESCRIPTION1;DESCRIPTION2;TAX;PRICE;PURCHASE PRICE;AVAILABILITY;MEASUREMENT UNIT;CATEGORY;PHOTO;URL;;WEIGHT;<br>\n P1;round pork pie;;23.00;1,80|2:2,00;;;Piece;Skewers with pie;<br>\n P2;chicken pita round;;23.00;2,00|2:1,20;;;Piece;Skewers with pie;<br>\n P3;straw pork pie;;23.00;1,80|4:3,50;;;Piece;Skewers with pie;<br>\n P4;skewer chicken pie;;23.00;2,00|2:2,00;;;Piece;Skewers with pie;<br>\n |
Clicking on EMDI purchases/sales INS button opens the window with the orders.
Opening this window the links “modifiedcustomers”, “modifiedproducts” automatically inserts the list of customers and products. If there are changes, “customersconfirm” and “productsconfirm” called accordingly, to inform the e-shop that the data imported.
E-shop should be always sending new customers and products and not the whole list. However in all cases only the differences are imported.
After the above “orderlist” link is called and brings the list of pending orders.
Every time you select an order in the left side the link “selectedorder” called in order to show the products of the selected order.
Then once you select the order and close the window, automatically inserted to the document all the products included and “pulled” from the e-shop.
When you click “Save” on EMDI then only the link that updates “confirmorder” e-shop that the order was billed. Then called the link “productavailability” in combination with variable “quantityvariable” sends e-shop availability.
To meet the availability needs to register the purchase invoices to EMDI, otherwise ignore the link.
Caution: The client code in EMDI must only contain numbers and uppercase characters.
resetdates
Με το “productsconfirm” και “customersconfirm” αποθηκεύουμε στο e-shop την ημερομηνία λήψης από την EMDI.
Η επαναφορά σβήνει αυτές τις ημερομηνίες και έτσι με το “modifiedproducts” και “modifiedcustomers” έχουμε όλη τη λίστα.
uploadproduct
From the EMDI warehouse, by pressing the registration button, the product and its photo will be sent by post.
Parameters:
productid | Product code |
productmpn | Vendor code |
title | Product title |
descr | Description |
price | Price with VAT |
sprice | Purchase value |
subcat | Subcategory line code |
cat | Category line code |
tax | VAT rate |
cattitle | Category title |
subcattitle | Subcategory title |
field_x | Additional variables. Where x is the name of the variable, e.g. field_Size |
cprice_x | Price list prices. Where x is the name of the variable, e.g. cprice_Retail. Attention, in order to send the corresponding price, the price list must be set in the warehouse item list |
file | The main photo |
file2,file2… | Pictures |
weight | Weight |
In settings->E-shop connection->With VAT, we define whether the price includes VAT.
uploadcustomer
redirect
In the customer account in the customer details, in the warehouse in the item details and in sales in the selected document, there is the possibility from the settings to display an additional button.