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. To get all available connections you can use following command: claritysuccess:connection:list.

Product import

The claritysuccess:import:product command offers following options:

$ ./bin/console claritysuccess:import:product -h
Description:
  Import product data from Clarity&Success

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.
      --ean[=EAN]          EAN, imports a single product using it's EAN
  -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

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

Import of a specific product (since version 1.1.0)

./bin/console claritysuccess:import:product --ean <EAN OF THE PRODUCT> 1 

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

Product image import (alternative to media import)

Note

Available since version 1.1.4

Important! This command should be used as an alternative to claritysuccess:import:media. The difference is as follows: claritysuccess:import:media downloads all images from Clarity&Success in a compressed form and imports them. Based on the file name they are then assigned to the products. All images from Clarity&Success are transferred, even if they are assigned to products that are not available in the online store. If the product number contains invalid special characters, these are missing in the file name. These images will then not be assigned.

claritysuccess:import:productimages, on the other hand, retrieves the images from Clarity&Success for each product individually. This command is slower, but only images are imported if the product is in the store. In addition, images of products that have special characters in the product number are imported.

$ ./bin/console claritysuccess:import:productimages --help
Description:
  Import product data from Clarity&Success

Usage:
  claritysuccess:import:productimages [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.
      --ean[=EAN]          EAN, imports a single product using it's EAN
  -k, --keep-existing      Keep existing images.
  -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

Assuming you are using the connection with ID 1:

Import all product images:

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

Import of all product images and in case of errors the import is not canceled:

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

Import of all product images, but only if the product has changed since the last import has changed:

./bin/console claritysuccess:import:productimages 1

Import all images of products that have changed since the last import. In case of errors, the import will not be cancelled:

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

Import of the images of a specific product:

./bin/console claritysuccess:import:productimages --ean <EAN DES PRODUKTS> 1

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.

Order exported checkbox

Tools

tba.