Drop Shipping module brings a new stock import feature that will import stock from a CSV file into any “supplier warehouse”.
This will help to keep a warehouse updated with your supplier stock to then allow it to be purchased on your website, for example.
Supplier stock import functions are located in 2 new tabs added to suppliers edition screen :
- Stock Import Settings
- Stock Import History
This tab is designed to configure how the supplier stock should be imported, and where the CSV file containing the stock is located.
It is divided into several subsections.
Chose there the kind of import that should be done.
You can chose between 3 options :
Option | Description |
---|---|
FTP | Stock file is located on the supplier FTP server. |
URL | Stock file is available from the supplier website URL. |
Local file | Stock file is located on your own server. |
Note
Depending of the option chosen, a new subsection will appear below this one, where you will be able to define details about the file location.
This subsection appear if you chose to import supplier stock via FTP.
You should provide there details on the FTP connection :
Option | Description |
---|---|
Connection type | Can be SFTP or FTP. For reference all connections made through port 22 are SFTP ones. |
Host | Host address, generally an IP address. |
Port | Port to use to connect to the server. |
Login | Login to use to connect to the server. |
Password | Password to use to connect to the server. |
File path | Path of the CSV stock file on the server. Should contain the file name at the end of the path. |
Passive mode | By default, connections are made through active mode. Only set the passive mode enabled if required. |
This subsection appear if you chose to import supplier stock via URL.
You should provide there the URL where the file is located on the supplier server.
This subsection appear if you chose to import supplier stock via local file.
You should provide there the path where the file is located on your server.
Note
Should contain the file name at the end of the path.
There you can define how the system should parse the stock file to be able to find each required information.
There are several parameters that should be defined :
Option | Description |
---|---|
Separator | Separator used in the CSV file to make separation between columns. Example : , OR ; |
Enclosure | Character used as enclosure to delimit each field. Example : " |
Target Warehouse | Warehouse where supplier stock will be imported to. |
Sku Index | Index of SKU column in the file. First column index is 0. |
Supplier Sku Index | Index of Supplier SKU column in the file. |
Barcode Index | Index of Barcode column in the file. |
Qty Index | Index of Qty column in the file. |
Buying Price Index | Index of Buying Price column in the file. |
Note
Be careful, all column indexes start from 0.
You must define at least Sku OR Supplier Sku columns indexes which are mandatory columns.
This section only contains one button Import now
that allow you ti process a manual import to check if settings you defined in previous sections are working well processing a manual import.
The second tab displays stock import history and allows to download report for each one.
Connection to FTP server.
Note
If it doesn’t work, the report will be flagged as “In error” as error message and the process will stop.
File will be parsed according to File settings configuration.
Note
If both Sku and Supplier Sku indexes are set, it will try to retrieve product from Sku and if it can’t be found like this, then it will try to retrieve it from supplier product association using the Supplier Sku.
If product can not be found, the line will be flagged with status “Product not found”.
Update of supplier buying price and supplier stock if their indexes are set.
Note
If supplier product association isn’t already set, it will automatically be created during the import process.
Prices with a value lower than 0 will not be updated.
There are two different ways to run the supplier stock import :
From supplier view by clicking on
Import Now
.From command line by using the following command (replace “YOUR_SUPPLIER_ID” by the ID of the supplier you want to import stock for) :
php bin/magento bms_dropshipping:supplier_stock_import --supplierId {YOUR_SUPPLIER_ID}
Note
No cron job is added by default on the stock import command line.
In order to schedule this task to run automatically, you must add the previous command in your crontab as a cron job :
0 0 * * * /bin/php bin/magento bms_dropshipping:supplier_stock_import --supplierId {YOUR_SUPPLIER_ID}