Adding OneStepCheckout Composer repository to your Magento 2 site.

Composer allows to install packages from remote repositories. In order to use OneStepCheckout license specific composer repository together with your Magento 2 site you need to add the REPOSITORY_URL channel to composer configuration. REPOSITORY_URL is available from our website download area.

Use ssh to access your server and in Magento folder execute following command:

composer config repositories.onestepcheckout_iosc composer REPOSITORY_URL;

Installing OneStepCheckout with Composer to your Magento 2 site.

After you have added OneStepCheckout composer repository to  your Magento 2 site you can install OneStepCheckout and its dependencies together with Composer.

Use ssh to access your server and in Magento folder execute following command:

composer require "onestepcheckout/iosc";
php bin/magento module:enable Onestepcheckout_Iosc;
php bin/magento setup:upgrade;
php bin/magento setup:di:compile; #only needed if your site is in production or default mode
php bin/magento cache:flush;

Adding local artifact Composer repository to your Magento 2 site.

Composer allows to install packages from local filesystem repositories. In order to use local composer repository together with your Magento 2 site you need to add the ARTIFACT_PATH channel to composer configuration. Where ARTIFACT_PATH is absolute path on your server filesystem where you store composer packages as zip files. Any path will do. Just don't put this to web accessible folders to avoid giving access to your purchased packages to public. You will use this path to store the downloaded composer package that is available from our website download area.

Use ssh to access your server and in Magento folder execute following command:

composer config repositories.onestepcheckout_iosc artifact ARTIFACT_PATH

Installing OneStepCheckout from downloadable package with composer from local repository.

After you have registered a local artifact channel with Composer to your Magento 2 site you you can install OneStepCheckout and its dependencies together with Composer. Make sure you have downloaded the latest package from our website download area and placed it to your ARTIFACT_PATH. 

Before installing OneStepCheckout you need to install it's composer dependencies. Use ssh to access your server and in Magento folder execute following commands:

composer require dflydev/dot-access-data; #might be already present, then skip this
composer require geoip2/geoip2:~2.0;

Then install OneStepCheckout. Use ssh to access your server and in Magento folder execute following commands:

composer require "onestepcheckout/iosc";
php bin/magento module:enable Onestepcheckout_Iosc;
php bin/magento setup:upgrade;
php bin/magento setup:di:compile; #only needed if your site is in production or default mode
php bin/magento cache:flush;

Upgrading OneStepCheckout with Composer to newer version on your Magento 2 site.

You can upgrade (or install) OneStepCheckout with specific VERSION_NUMBER and its dependencies together with Composer. This is similar to installing OneStepCheckout with composer but without the enable/disable command. You can get the latest VERSION_NUMBER from our website download area.

Use ssh to access your server and in Magento folder execute following commands:

composer require "onestepcheckout/iosc:VERSION_NUMBER";
php bin/magento setup:upgrade;
php bin/magento setup:di:compile; #only needed if your site is in production or default mode
php bin/magento cache:flush;

Upgrading OneStepCheckout from downloadable package with composer from local repository.

You will also need to download the specific package with VERSION_NUMBER from our download area and drop it to your ARTIFACT_PATH.  You can then upgrade (or install) OneStepCheckout with specific VERSION_NUMBER with Composer. This is similar to installing OneStepCheckout with composer but without the enable/disable command. You can get the latest VERSION_NUMBER  and downloadable package from our website download area. 

Use ssh to access your server and in Magento folder execute following commands:

composer require "onestepcheckout/iosc:VERSION_NUMBER";
php bin/magento setup:upgrade;
php bin/magento setup:di:compile; #only needed if your site is in production or default mode
php bin/magento cache:flush;

Uninstalling OneStepCheckout with composer on your Magento 2 site.

Composer provides a convenient way for removing installed packages from your Magento 2 site. 

Use ssh to access your server and in Magento folder execute following commands:

php bin/magento module:uninstall -r "Onestepcheckout_Iosc";
composer remove "onestepcheckout/iosc";
php bin/magento setup:upgrade;
php bin/magento setup:di:compile; #only needed if your site is in production or default mode
php bin/magento cache:flush;

Installing OneStepCheckout to app/code from downloadable package.

In addition to installing with Composer you can also install packages to app/code structure in your Magento 2 site. This method is not suggested and you should prefer the composer method.

Before installing OneStepCheckout you need to install it's composer dependencies. Use ssh to access your server and in Magento folder execute following commands:

composer require dflydev/dot-access-data; #might be already present, then skip this
composer require geoip2/geoip2:~2.0;

For this you need to create a folder to app/code on your Magento 2 site. Use ssh to access your server and in Magento folder execute following command:

mkdir -p app/code/Onestepcheckout/Iosc

After verifying that this folder is created you can unzip the downloadable OneStepCheckout installation package to that folder. You can get the downloadable package from our website download area. If this is done you can proceed with enabling OneStepCheckout on your Magento 2 site.

Use ssh to access your server and in Magento folder execute following commands:

php bin/magento module:enable Onestepcheckout_Iosc;
php bin/magento setup:upgrade;
php bin/magento setup:di:compile; #only needed if your site is in production or default mode
php bin/magento cache:flush;

Uninstalling OneStepCheckout from app/code.

To uninstall OneStepCheckout from app/code you need to uninstall the module and remove the folder. Note that rm -rf command in following guide is commented out (#) for your security. Always double check the paths or content you are about to delete , make backups if neccessary. 

Use ssh to access your server and in Magento folder execute following commands:

php bin/magento module:uninstall -r "Onestepcheckout_Iosc";
#rm -rf app/code/Onestepcheckout/Iosc;
php bin/magento setup:upgrade;
php bin/magento setup:di:compile; #only needed if your site is in production or default mode
php bin/magento cache:flush;