Command-line Interface

Import and Export Commands

The plugin offers you four commands for importing and exporting data:

  • Product import

  • Stock import

  • Media import

  • Order export

We recommend to add a cronjob for each command separately. For each command you need to specify which connection you want to use. Please have a look as the database table s_plugin_wesio_clarity_connection.

Product import

The claritysuccess:import:product command offers following options:

$ ./bin/console claritysuccess:import:product -h
Usage:
  claritysuccess:import:product [options] [--] <connectionId>
Arguments:
  connectionId             Connection ID
Options:
  -a, --sync-all           If set to false: only products which have been changed since the last run will be imported.
  -f, --force              Force: don't stop on errors.
  -h, --help               Display this help message
  -q, --quiet              Do not output any message
  -V, --version            Display this application version
      --ansi               Force ANSI output
      --no-ansi            Disable ANSI output
  -n, --no-interaction     Do not ask any interactive question
      --process-isolation  Launch commands from shell as a separate process.
  -e, --env=ENV            The Environment name. [default: "production"]
  -v|vv|vvv, --verbose     Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
  Import product data from Clarity&Success

Assume your connection has the ID 1:

Import all products:

./bin/console claritysuccess:import:product 1 -a

Import all products and do not stop at an error:

./bin/console claritysuccess:import:product 1 -a -f

Import all products which changed since the last sync:

./bin/console claritysuccess:import:product 1

Import all products which changed since the last sync and do not stop at errors:

./bin/console claritysuccess:import:product 1 -f

Stock import

The claritysuccess:import:stock command offers following options:

Usage:
  claritysuccess:import:stock [options] [--] <connectionId>

Arguments:
  connectionId             Connection ID

Options:
  -f, --force              Force: don't stop on errors.
  -h, --help               Display this help message
  -q, --quiet              Do not output any message
  -V, --version            Display this application version
      --ansi               Force ANSI output
      --no-ansi            Disable ANSI output
  -n, --no-interaction     Do not ask any interactive question
      --process-isolation  Launch commands from shell as a separate process.
  -e, --env=ENV            The Environment name. [default: "production"]
  -v|vv|vvv, --verbose     Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  Updates product's stock with data from  Clarity&Success

Assume your connection has the ID 1:

Import stock for all products:

./bin/console claritysuccess:import:product 1

Import stock for all products and do not stop at an error:

./bin/console claritysuccess:import:product 1 -f

Media import

The claritysuccess:import:media command offers following options:

$ ./bin/console claritysuccess:import:media -h
Usage:
  claritysuccess:import:media [options] [--] <connectionId>

Arguments:
  connectionId             Connection ID

Options:
  -a, --sync-all           If set to false: only images of products which have been changed since the last run will be imported.
  -f, --force              Force: don't stop on errors.
  -h, --help               Display this help message
  -q, --quiet              Do not output any message
  -V, --version            Display this application version
      --ansi               Force ANSI output
      --no-ansi            Disable ANSI output
  -n, --no-interaction     Do not ask any interactive question
      --process-isolation  Launch commands from shell as a separate process.
  -e, --env=ENV            The Environment name. [default: "production"]
  -v|vv|vvv, --verbose     Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  Import product images from Clarity&Success

Assume your connection has the ID 1:

Import all media files:

./bin/console claritysuccess:import:media 1 -a

Import all media files and do not stop at an error:

./bin/console claritysuccess:import:media 1 -a -f

Import all media files which changed since the last sync:

./bin/console claritysuccess:import:media 1

Import all media files which changed since the last sync and do not stop at errors:

./bin/console claritysuccess:import:media 1 -f

Order Export

The claritysuccess:export:order command offers following options:

$ ./bin/console claritysuccess:export:order -h
Usage:
  claritysuccess:export:order [options] [--] <connectionId>

Arguments:
  connectionId             Connection ID

Options:
  -f, --force              Force: don't stop on errors.
  -h, --help               Display this help message
  -q, --quiet              Do not output any message
  -V, --version            Display this application version
      --ansi               Force ANSI output
      --no-ansi            Disable ANSI output
  -n, --no-interaction     Do not ask any interactive question
      --process-isolation  Launch commands from shell as a separate process.
  -e, --env=ENV            The Environment name. [default: "production"]
  -v|vv|vvv, --verbose     Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  Send orders to Clarity&Success

Assume your connection has the ID 1:

Export all standing orders:

./bin/console claritysuccess:export:order 1

Export all standing orders and do not stop at an error:

./bin/console claritysuccess:export:order 1 -f

After an order has been exported, following checkbox will be enabled. If you want to export the same order again, you have to uncheck it.

../_images/synchronization_order_checkbox.png

Tools

tba.