Console Commands

It is possible to use a console command to reconnect or remove the account. This process can be handy when your deployments are automated.

3.8.0

Getting tokens from the Nosto Admin Panel.

Log-in into Nosto Admin with your already existing account, select the store you want to reconnect and head to Settings -> Authentication Tokens. To obtain the tokens, just hit the decrypt button. cropper

Getting Store View Scope Code From Magento's Backend

Since you need a different Nosto account for each store view, you need to get the store scope code. You can find in: System -> Manage stores

stores___system___magento_admin_and_editing_reconnecting_nosto_account_via_cli_command_ _nosto_nosto-magento2_wiki

You can find the store code under the store view link. If for any reason Magento do not show this information, you can also click in the storeview and lookup in the code field

english___stores___system___magento_admin

Using the Console Command to Reconnect Your Existing Nosto Account

The script file should be available in the %nosto_installation_root%/shell/reconnect.php.

If you have installed the extension through modman, the installation root directory should be under %magento_root%/.modman/nosto-magento.

If you have installed via Magento Connect or via package upload, the extension should be in the app/code/community/Nosto/Tagging directory.

In order to use this command with non-interactive installation scripts, you should pass all the parameters via command line arguments.

You can use the help from the command to figure out all the necessary parameters: image

Command Example:

php -f app/code/community/Nosto/Tagging/shell/reconnect.php -- \
--account-id NOSTO_ACCOUNT_NAME \
--products_token PRODUCTS_TOKEN \
--sso_token SSO_TOKEN \
--settings_token SETTINGS_TOKEN \
--rates_token EXCHANGE_RATES_TOKEN \
--scope-code STORE_VIEW_SCOPE_CODE \
--override
image

Using the Console Command to Remove Your Nosto Account

This command is used to disconnect an existing account from your store.

The script file should be available in the %nosto_installation_root%/shell/remove.php.

If you have installed the extension through modman, the installation root directory should be under %magento_root%/.modman/nosto-magento.

If you have installed via Magento Connect or via package upload, the extension should be in the app/code/community/Nosto/Tagging directory.

In order to use this command with non-interactive installation scripts, you should pass all the parameters via command line arguments.

image

Command Example:

php -f app/code/community/Nosto/Tagging/shell/remove.php -- \
--scope-code STORE_VIEW_SCOPE_CODE
image