Automate inventory update
Description
About the Extension
Purpose of this plugin
This plugin helps you to keep your stock informations up-to-date by providing
a cronjob to automate importing CSV files. In example in case you sell on
multiple platforms and want to sync your stock with your ERP.
The plugins cronjob checks in given intervals if the configured file has changed
and imports it in case it has.
(Un-)Install
By using the plugin manager, see Shopware documentation for details.
Please clear Shopwares cache after installing, otherwise it could happen that
components can’t be found. You should be asked to do so after installing.
Usage
How you invoke the cronjob, doesn’t matter. You can do so by using your browser,
your servers crontab or bin/console. For details please see the Shopware
documentation https://en-community.shopware.com/_detail_1103.html#Setting_up_a_cronjob.
To adjust the import interval, you can edit the cronjobs interval.
The “action name” for usage by bin/console is Shopware_CronJob_pixe2SimpleStockUpdateCron,
so the whole command is bin/console sw:cron:run Shopware_CronJob_pixe2SimpleStockUpdateCron.
Depending on the amount of articles, the import runtime could be quite high.
Because of that the execution by browser is unsuited.
Configuration
The plugin has options to adjust the process. Set this options like you
need them, then activate the cronjob. Please note that Shopwares own plugin
“Cron” must be active for this plugin to work.
Filepath
Enter the name of the import file here. The plugin assumes that this file
resides in the plugin directory. Plugin directory means <yourshop>/custom/plugins/pixe2SimpleStockUpdate.
But you can also enter relatives paths, as long as that path is readable for the
user account under which the webserver/PHP is running. For relative paths to
work, they must be relative to the plugin directory. In example, if the file is
located in the root of your shop, the path would be ../../../file.csv. Keep in
mind that not only the path itself, but also the file needs to be readable.
You can also give an HTTP(S) or FTP URL here, the file will be fetched and
deleted again after importing.
Column separator
Enter the column separator here. You can use any sequence of characters, in
example “,” or “;”. To use [TAB] als separator please enter “\t” here.
Identity column
Numerical index of the column holding the identity value
(Note: count starts at 0!)
Value column
Numerical index of the column containing the new stock value
(Note: count starts at 0!)
Skip first line
If the first line of the import file contains column headers, you can activate
this option to ignore it at import time.
Return value
Here you can configure how the result is handled. You can set it to return it in
either plaintext, JSON or serialized. Alternativly you can set it to echo’ing
instead of returning, or disable it at all.
(De-)activate articles
Will de-/activate articles based on the imported stock amount being positive
or not.
Identityfield
Allows you to choose the property used to match the import data onto articles.
By default the ordernumber will be used.
Disable locking
By default the plugin will create a file called “.lockfile” in the plugin directory
when starting the import. This file is used to prevent multiple imports from running
at the same time. If the last import was terminated early, most likely because of
execution by browser and max_execution_time, the file will not be deleted and prevent
further runs to properly start. You can use this option to disable this check without
deleting “.lockfile”.
IMPORTANT: This option is intented as workaround, not for permanent use. If the lockfile
still exists after the job is run, it was’t finished properly!
Disable check for changes
Normally the plugin will only start importing, when the import file has changed since
the last run. By enabling this option you can disable this check and force the import
to be executed no matter the “last modified” timestamp of the importfile.
Convert charset
If your importfile is not utf-8 encoded you can use this option to let the plugin
convert it by itself.
Note: this is only supported for Latin1 (ISO 8859-1) and Windows-1252.
Normalize linebreaks
In case your importfile uses “\r” linebreaks, or some mix, you can activate a
workaround with this option.
Deactivate articles not in importfile
If activated articles not contained in the importfile will be deactivated. To
narrow this you can use the option ““not in importfile” prefix”.
Note: this only works when using the ordernumber as identityfield!
“not in importfile” prefixWhen given, the “Deactivate articles not in importfile” option will only affect
articles which ordernumber starts with this value.
If activated, the stock of articles to be deactivated will be set to 0.
Pickware support
If activated, stock changes will be imported “natively” into Pickware instead of
simply changing the articles inStock attribute.
In case you used this plugin im combination with Pickware before this option existed,
all stock changes were executed directly on the “reserved stock”. With this option
activated all changes will be executed on the “physical stock” instead. Because of
this it’s possible that the resulting stock is incorrect, or doubled after importing
the first time with this option activated. So please make sure to check the stock of
affected articles afterwards!
If the import file contains relative values instead of a totals, activate this
option. Without this option the file is expected to contain total values.
Enter the target warehouse name here.
Pickware support: Target bin locationWith this option you can give the bin location for the imported stock (default:
pickware_null_bin_location).
Remarks
Non existing articles will be logged as error, but import of the file will be
continued nonetheless.
In case there is a non-numeric inventory value in the file for some article, the
affected article will have an inStock value of 0 after import.
The results of the import can be viewed in the configured format, in the cronjob
configuration. Or you could redirect the output into a file.
All columns except the ones for articlenumber and stock will be ignored. But
keep in mind that they need to be loaded into memory anyway. Depending on
filesize it can make sense to reduce the file before.
Details
- Available: English, German
- Latest update: 15 November 2021
- Publication date: 13 November 2017
- Version: 1.9.2
- Category: Administration
Resources
Reviews (7)
Spitzenmäßig
Tolles Plugin, fairer Preis und erstklassiger Support !
VIELEN DANK !!!
Perfekt
Der automatische Bestandsabgleich erspart uns nun viel Zeit.
Vielen Dank.
Insgesamt gibt es 5 Sterne! Da hätte ich gerne auch mehr gegeben, leider kann man max. 5 vergeben :))
Läuft super!
Sehr gut. Tut genau was es soll.
Mega Mensch vielen dank für die Hilfe bei allen Anliegen die wir immer haben :-)
About the Extension Partner
Pixelworkz (Tobias Bäumer)
Partner Status
-
Shopware
Extension Partner
Details
- Ø-Rating: 5
- Partner since: 2015
- Extensions: 7
Support
- Based in: Germany
- Speaks: German, English
- Response time: Very quickly