Installing Drupal Commerce with Drupal 8/9

What is Drupal Commerce. Here are couple of websites to explain:

 

Before we begin, you should be able to use Composer as this is the default method to install Drupal core and modules for Drupal 8/9.

We will be installing a complete full installation. This is basically Drupal core with Drupal Commerce so you have a working shopping cart out of the box. This is what Drupal calls a distribution. If you already have Drupal 8/9 and want to install Drupal Commerce into your existing site, you can simply just type and run: 

composer require 'drupal/commerce:^2.23'

 This will install Drupal commerce and all its dependences into your existing site. You then just need to enable any of the commerce modules to use. But in this tutorial we will be setting up a new clean full installation. 

This tutorial installs Drupal Commerce on a VPS server with root access. You should be able to install on a test environment on your own computer, provided you have a LAMP stack or shared hosting if you want. My setup is as follows: Apache 2, PHP 7.4, MySQL 5.7.26 and Composer 2

Let's get started. First, setup a new database so we have it ready to use for Drupal Commerce. Open up a command line or terminal and navigate to your webroot directory (usually, www or htdocs). 

Type and run this command:

composer create-project drupalcommerce/project-base mystore --stability dev

 This will fetch and download all the files required for your full installation (Drupal core and Drupal Commerce). 

 

This is the list of all the dependences and libraries composer will download for you. 

Creating a "drupalcommerce/project-base" project at "./mystore"

Installing drupalcommerce/project-base (8.x-dev 35d7fd0dcf636c74f58f22ebf58e3162f1b90c0d)

  - Syncing drupalcommerce/project-base (8.x-dev 35d7fd0) into cache

  - Installing drupalcommerce/project-base (8.x-dev 35d7fd0): Cloning 35d7fd0dcf from cache

Created project in /Applications/MAMP/htdocs/commerce/mystore

> DrupalProject\composer\ScriptHandler::checkComposerVersion

Loading composer repositories with package information

Updating dependencies                                 

Lock file operations: 157 installs, 0 updates, 0 removals

  - Locking asm89/stack-cors (1.3.0)

  - Locking behat/mink (v1.8.1)

  - Locking behat/mink-browserkit-driver (v1.3.4)

  - Locking behat/mink-goutte-driver (v1.2.1)

  - Locking behat/mink-selenium2-driver (v1.4.0)

  - Locking chi-teck/drupal-code-generator (1.33.1)

  - Locking commerceguys/addressing (v1.1.0)

  - Locking commerceguys/intl (v1.0.7)

  - Locking composer/ca-bundle (1.2.9)

  - Locking composer/composer (1.10.19)

  - Locking composer/installers (v1.10.0)

  - Locking composer/semver (1.7.2)

  - Locking composer/spdx-licenses (1.5.5)

  - Locking composer/xdebug-handler (1.4.5)

  - Locking consolidation/annotated-command (2.12.1)

  - Locking consolidation/config (1.2.1)

  - Locking consolidation/filter-via-dot-access-data (1.0.0)

  - Locking consolidation/log (1.1.1)

  - Locking consolidation/output-formatters (3.5.1)

  - Locking consolidation/robo (1.4.13)

  - Locking consolidation/self-update (1.2.0)

  - Locking consolidation/site-alias (3.0.1)

  - Locking consolidation/site-process (2.1.0)

  - Locking container-interop/container-interop (1.2.0)

  - Locking cweagans/composer-patches (1.7.0)

  - Locking dflydev/dot-access-data (v1.1.0)

  - Locking dnoegel/php-xdg-base-dir (v0.1.1)

  - Locking doctrine/annotations (1.11.1)

  - Locking doctrine/cache (1.10.2)

  - Locking doctrine/collections (1.6.7)

  - Locking doctrine/common (2.13.3)

  - Locking doctrine/event-manager (1.1.1)

  - Locking doctrine/inflector (1.4.3)

  - Locking doctrine/instantiator (1.4.0)

  - Locking doctrine/lexer (1.2.1)

  - Locking doctrine/persistence (1.3.8)

  - Locking doctrine/reflection (1.2.2)

  - Locking drupal/address (1.9.0)

  - Locking drupal/admin_toolbar (2.4.0)

  - Locking drupal/coder (8.3.12)

  - Locking drupal/commerce (2.23.0)

  - Locking drupal/core (8.9.12)

  - Locking drupal/core-composer-scaffold (8.9.12)

  - Locking drupal/core-dev (8.9.12)

  - Locking drupal/entity (1.2.0)

  - Locking drupal/entity_reference_revisions (1.8.0)

  - Locking drupal/inline_entity_form (1.0.0-rc8)

  - Locking drupal/mailsystem (4.3.0)

  - Locking drupal/profile (1.2.0)

  - Locking drupal/search_api (1.18.0)

  - Locking drupal/state_machine (1.0.0)

  - Locking drupal/swiftmailer (2.0.0)

  - Locking drupal/token (1.9.0)

  - Locking drupalcommerce/commerce_base (dev-8.x-1.x 176717f)

  - Locking drush/drush (10.3.6)

  - Locking easyrdf/easyrdf (0.9.1)

  - Locking egulias/email-validator (2.1.25)

  - Locking fabpot/goutte (v3.2.3)

  - Locking grasmash/expander (1.0.0)

  - Locking grasmash/yaml-expander (1.4.0)

  - Locking guzzlehttp/guzzle (6.5.5)

  - Locking guzzlehttp/promises (1.4.0)

  - Locking guzzlehttp/psr7 (1.7.0)

  - Locking html2text/html2text (4.3.1)

  - Locking instaclick/php-webdriver (1.4.7)

  - Locking jcalderonzumba/gastonjs (v1.2.0)

  - Locking jcalderonzumba/mink-phantomjs-driver (v0.3.3)

  - Locking justinrainbow/json-schema (5.2.10)

  - Locking laminas/laminas-diactoros (1.8.7p2)

  - Locking laminas/laminas-escaper (2.7.0)

  - Locking laminas/laminas-feed (2.13.1)

  - Locking laminas/laminas-stdlib (3.3.1)

  - Locking laminas/laminas-zendframework-bridge (1.1.1)

  - Locking league/container (2.4.1)

  - Locking masterminds/html5 (2.7.4)

  - Locking mikey179/vfsstream (v1.6.8)

  - Locking myclabs/deep-copy (1.10.2)

  - Locking nikic/php-parser (v4.10.4)

  - Locking oomphinc/composer-installers-extender (2.0.0)

  - Locking pear/archive_tar (1.4.11)

  - Locking pear/console_getopt (v1.4.3)

  - Locking pear/pear-core-minimal (v1.10.10)

  - Locking pear/pear_exception (v1.0.1)

  - Locking phar-io/manifest (1.0.3)

  - Locking phar-io/version (2.0.1)

  - Locking phpdocumentor/reflection-common (2.2.0)

  - Locking phpdocumentor/reflection-docblock (5.2.2)

  - Locking phpdocumentor/type-resolver (1.4.0)

  - Locking phpspec/prophecy (1.12.2)

  - Locking phpunit/php-code-coverage (6.1.4)

  - Locking phpunit/php-file-iterator (2.0.3)

  - Locking phpunit/php-text-template (1.2.1)

  - Locking phpunit/php-timer (2.1.3)

  - Locking phpunit/php-token-stream (3.1.2)

  - Locking phpunit/phpunit (7.5.20)

  - Locking psr/container (1.0.0)

  - Locking psr/http-message (1.0.1)

  - Locking psr/log (1.1.3)

  - Locking psy/psysh (v0.10.5)

  - Locking ralouphie/getallheaders (3.0.3)

  - Locking sebastian/code-unit-reverse-lookup (1.0.2)

  - Locking sebastian/comparator (3.0.3)

  - Locking sebastian/diff (3.0.3)

  - Locking sebastian/environment (4.2.4)

  - Locking sebastian/exporter (3.1.3)

  - Locking sebastian/global-state (2.0.0)

  - Locking sebastian/object-enumerator (3.0.4)

  - Locking sebastian/object-reflector (1.1.2)

  - Locking sebastian/recursion-context (3.0.1)

  - Locking sebastian/resource-operations (2.0.2)

  - Locking sebastian/version (2.0.1)

  - Locking seld/jsonlint (1.8.3)

  - Locking seld/phar-utils (1.1.1)

  - Locking sirbrillig/phpcs-variable-analysis (v2.10.1)

  - Locking squizlabs/php_codesniffer (3.5.8)

  - Locking stack/builder (v1.0.6)

  - Locking swiftmailer/swiftmailer (v6.2.5)

  - Locking symfony-cmf/routing (1.4.1)

  - Locking symfony/browser-kit (v3.4.47)

  - Locking symfony/class-loader (v3.4.47)

  - Locking symfony/console (v3.4.47)

  - Locking symfony/css-selector (v3.4.47)

  - Locking symfony/debug (v3.4.47)

  - Locking symfony/dependency-injection (v3.4.47)

  - Locking symfony/dom-crawler (v3.4.47)

  - Locking symfony/event-dispatcher (v3.4.47)

  - Locking symfony/filesystem (v3.4.47)

  - Locking symfony/finder (v3.4.47)

  - Locking symfony/http-foundation (v3.4.47)

  - Locking symfony/http-kernel (v3.4.47)

  - Locking symfony/lock (v3.4.47)

  - Locking symfony/phpunit-bridge (v3.4.47)

  - Locking symfony/polyfill-ctype (v1.22.0)

  - Locking symfony/polyfill-iconv (v1.22.0)

  - Locking symfony/polyfill-intl-idn (v1.22.0)

  - Locking symfony/polyfill-intl-normalizer (v1.22.0)

  - Locking symfony/polyfill-mbstring (v1.22.0)

  - Locking symfony/polyfill-php56 (v1.20.0)

  - Locking symfony/polyfill-php70 (v1.20.0)

  - Locking symfony/polyfill-php72 (v1.22.0)

  - Locking symfony/polyfill-php80 (v1.22.0)

  - Locking symfony/process (v3.4.47)

  - Locking symfony/psr-http-message-bridge (v1.2.0)

  - Locking symfony/routing (v3.4.47)

  - Locking symfony/serializer (v3.4.47)

  - Locking symfony/translation (v3.4.47)

  - Locking symfony/validator (v3.4.47)

  - Locking symfony/var-dumper (v4.4.18)

  - Locking symfony/yaml (v3.4.47)

  - Locking theseer/tokenizer (1.2.0)

  - Locking tijsverkoyen/css-to-inline-styles (2.2.3)

  - Locking twig/twig (v1.44.2)

  - Locking typo3/phar-stream-wrapper (v3.1.6)

  - Locking webflo/drupal-finder (1.2.2)

  - Locking webmozart/assert (1.9.1)

  - Locking webmozart/path-util (2.3.0)

  - Locking zaporylie/composer-drupal-optimizations (1.2.0)

Writing lock file

Installing dependencies from lock file (including require-dev)

Package operations: 157 installs, 0 updates, 0 removals

  - Downloading drupal/core-composer-scaffold (8.9.12)

  - Downloading composer/installers (v1.10.0)

  - Downloading symfony/polyfill-ctype (v1.22.0)

  - Downloading symfony/polyfill-mbstring (v1.22.0)

  - Downloading symfony/http-foundation (v3.4.47)

  - Downloading symfony/event-dispatcher (v3.4.47)

  - Downloading symfony/debug (v3.4.47)

  - Downloading symfony/http-kernel (v3.4.47)

  - Downloading symfony/dom-crawler (v3.4.47)

  - Downloading symfony/browser-kit (v3.4.47)

  - Downloading symfony/css-selector (v3.4.47)

  - Downloading behat/mink (v1.8.1)

  - Downloading behat/mink-browserkit-driver (v1.3.4)

  - Downloading commerceguys/intl (v1.0.7)

  - Downloading composer/ca-bundle (1.2.9)

  - Downloading composer/spdx-licenses (1.5.5)

  - Downloading composer/xdebug-handler (1.4.5)

  - Downloading symfony/finder (v3.4.47)

  - Downloading symfony/console (v3.4.47)

  - Downloading dflydev/dot-access-data (v1.1.0)

  - Downloading consolidation/output-formatters (3.5.1)

  - Downloading consolidation/annotated-command (2.12.1)

  - Downloading consolidation/log (1.1.1)

  - Downloading symfony/filesystem (v3.4.47)

  - Downloading consolidation/self-update (1.2.0)

  - Downloading doctrine/lexer (1.2.1)

  - Downloading doctrine/event-manager (1.1.1)

  - Downloading doctrine/collections (1.6.7)

  - Downloading doctrine/cache (1.10.2)

  - Downloading doctrine/persistence (1.3.8)

  - Downloading doctrine/inflector (1.4.3)

  - Downloading doctrine/common (2.13.3)

  - Downloading twig/twig (v1.44.2)

  - Downloading symfony/yaml (v3.4.47)

  - Downloading symfony/translation (v3.4.47)

  - Downloading symfony/validator (v3.4.47)

  - Downloading symfony/serializer (v3.4.47)

  - Downloading symfony/routing (v3.4.47)

  - Downloading symfony/psr-http-message-bridge (v1.2.0)

  - Downloading symfony/process (v3.4.47)

  - Downloading symfony/polyfill-iconv (v1.22.0)

  - Downloading symfony/dependency-injection (v3.4.47)

  - Downloading symfony/class-loader (v3.4.47)

  - Downloading stack/builder (v1.0.6)

  - Downloading laminas/laminas-stdlib (3.3.1)

  - Downloading laminas/laminas-feed (2.13.1)

  - Downloading symfony/polyfill-intl-normalizer (v1.22.0)

  - Downloading symfony/polyfill-intl-idn (v1.22.0)

  - Downloading egulias/email-validator (2.1.25)

  - Downloading composer/semver (1.7.2)

  - Downloading drupal/core (8.9.12)

  - Downloading commerceguys/addressing (v1.1.0)

  - Downloading drupal/address (1.9.0)

  - Downloading symfony/phpunit-bridge (v3.4.47)

  - Downloading symfony/lock (v3.4.47)

  - Downloading sebastian/version (2.0.1)

  - Downloading sebastian/resource-operations (2.0.2)

  - Downloading sebastian/recursion-context (3.0.1)

  - Downloading sebastian/object-reflector (1.1.2)

  - Downloading sebastian/object-enumerator (3.0.4)

  - Downloading sebastian/global-state (2.0.0)

  - Downloading sebastian/exporter (3.1.3)

  - Downloading sebastian/environment (4.2.4)

  - Downloading sebastian/diff (3.0.3)

  - Downloading sebastian/comparator (3.0.3)

  - Downloading phpunit/php-timer (2.1.3)

  - Downloading phpunit/php-text-template (1.2.1)

  - Downloading phpunit/php-file-iterator (2.0.3)

  - Downloading theseer/tokenizer (1.2.0)

  - Downloading sebastian/code-unit-reverse-lookup (1.0.2)

  - Downloading phpunit/php-token-stream (3.1.2)

  - Downloading phpunit/php-code-coverage (6.1.4)

  - Downloading phpdocumentor/reflection-common (2.2.0)

  - Downloading phpdocumentor/type-resolver (1.4.0)

  - Downloading phpdocumentor/reflection-docblock (5.2.2)

  - Downloading doctrine/instantiator (1.4.0)

  - Downloading phpspec/prophecy (1.12.2)

  - Downloading phar-io/version (2.0.1)

  - Downloading phar-io/manifest (1.0.3)

  - Downloading myclabs/deep-copy (1.10.2)

  - Downloading phpunit/phpunit (7.5.20)

  - Downloading mikey179/vfsstream (v1.6.8)

  - Downloading justinrainbow/json-schema (5.2.10)

  - Downloading jcalderonzumba/gastonjs (v1.2.0)

  - Downloading jcalderonzumba/mink-phantomjs-driver (v0.3.3)

  - Downloading squizlabs/php_codesniffer (3.5.8)

  - Downloading sirbrillig/phpcs-variable-analysis (v2.10.1)

  - Syncing drupal/coder (8.3.12) into cache

  - Downloading seld/phar-utils (1.1.1)

  - Downloading seld/jsonlint (1.8.3)

  - Downloading composer/composer (1.10.19)

  - Downloading instaclick/php-webdriver (1.4.7)

  - Downloading behat/mink-selenium2-driver (v1.4.0)

  - Downloading fabpot/goutte (v3.2.3)

  - Downloading behat/mink-goutte-driver (v1.2.1)

  - Downloading drupal/entity_reference_revisions (1.8.0)

  - Downloading drupal/mailsystem (4.3.0)

  - Downloading drupal/profile (1.2.0)

  - Downloading drupal/search_api (1.18.0)

  - Downloading drupal/state_machine (1.0.0)

  - Downloading tijsverkoyen/css-to-inline-styles (2.2.3)

  - Downloading swiftmailer/swiftmailer (v6.2.5)

  - Downloading html2text/html2text (4.3.1)

  - Downloading drupal/swiftmailer (2.0.0)

  - Downloading drupal/commerce (2.23.0)

  - Syncing drupalcommerce/commerce_base (dev-8.x-1.x 176717f) into cache

  - Downloading webmozart/path-util (2.3.0)

  - Downloading symfony/polyfill-php80 (v1.22.0)

  - Downloading symfony/var-dumper (v4.4.18)

  - Downloading dnoegel/php-xdg-base-dir (v0.1.1)

  - Downloading league/container (2.4.1)

  - Downloading grasmash/yaml-expander (1.4.0)

  - Downloading grasmash/expander (1.0.0)

  - Downloading consolidation/config (1.2.1)

  - Downloading consolidation/site-alias (3.0.1)

  - Downloading consolidation/site-process (2.1.0)

  - Downloading consolidation/robo (1.4.13)

  - Downloading consolidation/filter-via-dot-access-data (1.0.0)

  - Installing cweagans/composer-patches (1.7.0): Extracting archive

  - Installing drupal/core-composer-scaffold (8.9.12): Extracting archive

  - Installing composer/installers (v1.10.0): Extracting archive

  - Installing zaporylie/composer-drupal-optimizations (1.2.0): Extracting archive

  - Installing oomphinc/composer-installers-extender (2.0.0): Extracting archive

  - Installing symfony/polyfill-php56 (v1.20.0)

  - Installing symfony/polyfill-ctype (v1.22.0): Extracting archive

  - Installing symfony/polyfill-php70 (v1.20.0)

  - Installing symfony/polyfill-mbstring (v1.22.0): Extracting archive

  - Installing symfony/http-foundation (v3.4.47): Extracting archive

  - Installing symfony/event-dispatcher (v3.4.47): Extracting archive

  - Installing psr/log (1.1.3): Extracting archive

  - Installing symfony/debug (v3.4.47): Extracting archive

  - Installing symfony/http-kernel (v3.4.47): Extracting archive

  - Installing asm89/stack-cors (1.3.0): Extracting archive

  - Installing symfony/dom-crawler (v3.4.47): Extracting archive

  - Installing symfony/browser-kit (v3.4.47): Extracting archive

  - Installing symfony/css-selector (v3.4.47): Extracting archive

  - Installing behat/mink (v1.8.1): Extracting archive

  - Installing behat/mink-browserkit-driver (v1.3.4): Extracting archive

  - Installing commerceguys/intl (v1.0.7): Extracting archive

  - Installing composer/ca-bundle (1.2.9): Extracting archive

  - Installing composer/spdx-licenses (1.5.5): Extracting archive

  - Installing composer/xdebug-handler (1.4.5): Extracting archive

  - Installing symfony/finder (v3.4.47): Extracting archive

  - Installing symfony/console (v3.4.47): Extracting archive

  - Installing dflydev/dot-access-data (v1.1.0): Extracting archive

  - Installing consolidation/output-formatters (3.5.1): Extracting archive

  - Installing consolidation/annotated-command (2.12.1): Extracting archive

  - Installing consolidation/log (1.1.1): Extracting archive

  - Installing symfony/filesystem (v3.4.47): Extracting archive

  - Installing consolidation/self-update (1.2.0): Extracting archive

  - Installing doctrine/lexer (1.2.1): Extracting archive

  - Installing doctrine/annotations (1.11.1): Extracting archive

  - Installing doctrine/reflection (1.2.2): Extracting archive

  - Installing doctrine/event-manager (1.1.1): Extracting archive

  - Installing doctrine/collections (1.6.7): Extracting archive

  - Installing doctrine/cache (1.10.2): Extracting archive

  - Installing doctrine/persistence (1.3.8): Extracting archive

  - Installing doctrine/inflector (1.4.3): Extracting archive

  - Installing doctrine/common (2.13.3): Extracting archive

  - Installing typo3/phar-stream-wrapper (v3.1.6): Extracting archive

  - Installing twig/twig (v1.44.2): Extracting archive

  - Installing symfony/yaml (v3.4.47): Extracting archive

  - Installing symfony/translation (v3.4.47): Extracting archive

  - Installing symfony/validator (v3.4.47): Extracting archive

  - Installing symfony/serializer (v3.4.47): Extracting archive

  - Installing symfony/routing (v3.4.47): Extracting archive

  - Installing psr/http-message (1.0.1): Extracting archive

  - Installing symfony/psr-http-message-bridge (v1.2.0): Extracting archive

  - Installing symfony/process (v3.4.47): Extracting archive

  - Installing symfony/polyfill-iconv (v1.22.0): Extracting archive

  - Installing psr/container (1.0.0): Extracting archive

  - Installing symfony/dependency-injection (v3.4.47): Extracting archive

  - Installing symfony/class-loader (v3.4.47): Extracting archive

  - Installing symfony-cmf/routing (1.4.1): Extracting archive

  - Installing stack/builder (v1.0.6): Extracting archive

  - Installing pear/pear_exception (v1.0.1): Extracting archive

  - Installing pear/console_getopt (v1.4.3): Extracting archive

  - Installing pear/pear-core-minimal (v1.10.10): Extracting archive

  - Installing pear/archive_tar (1.4.11): Extracting archive

  - Installing masterminds/html5 (2.7.4): Extracting archive

  - Installing laminas/laminas-zendframework-bridge (1.1.1): Extracting archive

  - Installing laminas/laminas-stdlib (3.3.1): Extracting archive

  - Installing laminas/laminas-escaper (2.7.0): Extracting archive

  - Installing laminas/laminas-feed (2.13.1): Extracting archive

  - Installing laminas/laminas-diactoros (1.8.7p2): Extracting archive

  - Installing symfony/polyfill-php72 (v1.22.0): Extracting archive

  - Installing symfony/polyfill-intl-normalizer (v1.22.0): Extracting archive

  - Installing symfony/polyfill-intl-idn (v1.22.0): Extracting archive

  - Installing ralouphie/getallheaders (3.0.3): Extracting archive

  - Installing guzzlehttp/psr7 (1.7.0): Extracting archive

  - Installing guzzlehttp/promises (1.4.0): Extracting archive

  - Installing guzzlehttp/guzzle (6.5.5): Extracting archive

  - Installing egulias/email-validator (2.1.25): Extracting archive

  - Installing easyrdf/easyrdf (0.9.1): Extracting archive

  - Installing composer/semver (1.7.2): Extracting archive

  - Installing drupal/core (8.9.12): Extracting archive

  - Installing commerceguys/addressing (v1.1.0): Extracting archive

  - Installing drupal/address (1.9.0): Extracting archive

  - Installing symfony/phpunit-bridge (v3.4.47): Extracting archive

  - Installing symfony/lock (v3.4.47): Extracting archive

  - Installing sebastian/version (2.0.1): Extracting archive

  - Installing sebastian/resource-operations (2.0.2): Extracting archive

  - Installing sebastian/recursion-context (3.0.1): Extracting archive

  - Installing sebastian/object-reflector (1.1.2): Extracting archive

  - Installing sebastian/object-enumerator (3.0.4): Extracting archive

  - Installing sebastian/global-state (2.0.0): Extracting archive

  - Installing sebastian/exporter (3.1.3): Extracting archive

  - Installing sebastian/environment (4.2.4): Extracting archive

  - Installing sebastian/diff (3.0.3): Extracting archive

  - Installing sebastian/comparator (3.0.3): Extracting archive

  - Installing phpunit/php-timer (2.1.3): Extracting archive

  - Installing phpunit/php-text-template (1.2.1): Extracting archive

  - Installing phpunit/php-file-iterator (2.0.3): Extracting archive

  - Installing theseer/tokenizer (1.2.0): Extracting archive

  - Installing sebastian/code-unit-reverse-lookup (1.0.2): Extracting archive

  - Installing phpunit/php-token-stream (3.1.2): Extracting archive

  - Installing phpunit/php-code-coverage (6.1.4): Extracting archive

  - Installing webmozart/assert (1.9.1): Extracting archive

  - Installing phpdocumentor/reflection-common (2.2.0): Extracting archive

  - Installing phpdocumentor/type-resolver (1.4.0): Extracting archive

  - Installing phpdocumentor/reflection-docblock (5.2.2): Extracting archive

  - Installing doctrine/instantiator (1.4.0): Extracting archive

  - Installing phpspec/prophecy (1.12.2): Extracting archive

  - Installing phar-io/version (2.0.1): Extracting archive

  - Installing phar-io/manifest (1.0.3): Extracting archive

  - Installing myclabs/deep-copy (1.10.2): Extracting archive

  - Installing phpunit/phpunit (7.5.20): Extracting archive

  - Installing mikey179/vfsstream (v1.6.8): Extracting archive

  - Installing justinrainbow/json-schema (5.2.10): Extracting archive

  - Installing jcalderonzumba/gastonjs (v1.2.0): Extracting archive

  - Installing jcalderonzumba/mink-phantomjs-driver (v0.3.3): Extracting archive

  - Installing squizlabs/php_codesniffer (3.5.8): Extracting archive

  - Installing sirbrillig/phpcs-variable-analysis (v2.10.1): Extracting archive

  - Installing drupal/coder (8.3.12): Cloning 719ddb16ae from cache

  - Installing seld/phar-utils (1.1.1): Extracting archive

  - Installing seld/jsonlint (1.8.3): Extracting archive

  - Installing composer/composer (1.10.19): Extracting archive

  - Installing instaclick/php-webdriver (1.4.7): Extracting archive

  - Installing behat/mink-selenium2-driver (v1.4.0): Extracting archive

  - Installing fabpot/goutte (v3.2.3): Extracting archive

  - Installing behat/mink-goutte-driver (v1.2.1): Extracting archive

  - Installing drupal/core-dev (8.9.12)

  - Installing drupal/entity_reference_revisions (1.8.0): Extracting archive

  - Installing drupal/inline_entity_form (1.0.0-rc8): Extracting archive

  - Installing drupal/mailsystem (4.3.0): Extracting archive

  - Installing drupal/entity (1.2.0): Extracting archive

  - Installing drupal/profile (1.2.0): Extracting archive

  - Installing drupal/search_api (1.18.0): Extracting archive

  - Installing drupal/state_machine (1.0.0): Extracting archive

  - Installing drupal/token (1.9.0): Extracting archive

  - Installing tijsverkoyen/css-to-inline-styles (2.2.3): Extracting archive

  - Installing swiftmailer/swiftmailer (v6.2.5): Extracting archive

  - Installing html2text/html2text (4.3.1): Extracting archive

  - Installing drupal/swiftmailer (2.0.0): Extracting archive

  - Installing drupal/commerce (2.23.0): Extracting archive

  - Installing drupal/admin_toolbar (2.4.0): Extracting archive

  - Installing drupalcommerce/commerce_base (dev-8.x-1.x 176717f): Cloning 176717f757 from cache

  - Installing webmozart/path-util (2.3.0): Extracting archive

  - Installing webflo/drupal-finder (1.2.2): Extracting archive

  - Installing symfony/polyfill-php80 (v1.22.0): Extracting archive

  - Installing symfony/var-dumper (v4.4.18): Extracting archive

  - Installing nikic/php-parser (v4.10.4): Extracting archive

  - Installing dnoegel/php-xdg-base-dir (v0.1.1): Extracting archive

  - Installing psy/psysh (v0.10.5): Extracting archive

  - Installing container-interop/container-interop (1.2.0): Extracting archive

  - Installing league/container (2.4.1): Extracting archive

  - Installing grasmash/yaml-expander (1.4.0): Extracting archive

  - Installing grasmash/expander (1.0.0): Extracting archive

  - Installing consolidation/config (1.2.1): Extracting archive

  - Installing consolidation/site-alias (3.0.1): Extracting archive

  - Installing consolidation/site-process (2.1.0): Extracting archive

  - Installing consolidation/robo (1.4.13): Extracting archive

  - Installing consolidation/filter-via-dot-access-data (1.0.0): Extracting archive

  - Installing chi-teck/drupal-code-generator (1.33.1): Extracting archive

  - Installing drush/drush (10.3.6): Extracting archive

42 package suggestions were added by new dependencies, use `composer suggest` to see details.

Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/container instead.

Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.

Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.

Generating autoload files

66 packages you are using are looking for funding.

Use the `composer fund` command to find out more!

Scaffolding files for drupal/core:

  - Copy [project-root]/.editorconfig from assets/scaffold/files/editorconfig

  - Copy [project-root]/.gitattributes from assets/scaffold/files/gitattributes

  - Copy [web-root]/.csslintrc from assets/scaffold/files/csslintrc

  - Copy [web-root]/.eslintignore from assets/scaffold/files/eslintignore

  - Copy [web-root]/.eslintrc.json from assets/scaffold/files/eslintrc.json

  - Copy [web-root]/.ht.router.php from assets/scaffold/files/ht.router.php

  - Copy [web-root]/.htaccess from assets/scaffold/files/htaccess

  - Copy [web-root]/example.gitignore from assets/scaffold/files/example.gitignore

  - Copy [web-root]/index.php from assets/scaffold/files/index.php

  - Copy [web-root]/INSTALL.txt from assets/scaffold/files/drupal.INSTALL.txt

  - Copy [web-root]/README.txt from assets/scaffold/files/drupal.README.txt

  - Copy [web-root]/robots.txt from assets/scaffold/files/robots.txt

  - Copy [web-root]/update.php from assets/scaffold/files/update.php

  - Copy [web-root]/web.config from assets/scaffold/files/web.config

  - Copy [web-root]/sites/README.txt from assets/scaffold/files/sites.README.txt

  - Copy [web-root]/sites/development.services.yml from assets/scaffold/files/development.services.yml

  - Copy [web-root]/sites/example.settings.local.php from assets/scaffold/files/example.settings.local.php

  - Copy [web-root]/sites/example.sites.php from assets/scaffold/files/example.sites.php

  - Copy [web-root]/sites/default/default.services.yml from assets/scaffold/files/default.services.yml

  - Copy [web-root]/sites/default/default.settings.php from assets/scaffold/files/default.settings.php

  - Copy [web-root]/modules/README.txt from assets/scaffold/files/modules.README.txt

  - Copy [web-root]/profiles/README.txt from assets/scaffold/files/profiles.README.txt

  - Copy [web-root]/themes/README.txt from assets/scaffold/files/themes.README.txt

> DrupalProject\composer\ScriptHandler::createRequiredFiles

Created a sites/default/settings.php file with chmod 0666

Created a sites/default/files directory with chmod 0777

Do you want to remove the existing VCS (.git, .svn..) history? [Y,n]? y

Composer creates a directory we specify named 'mystore' and inside this directory we have /web directory. This directory contains all the files that are needed to serve up the site. So you will need to create a a new document root and make /mystore/web the webroot. 

If you are installing on a shared hosting server, you will not have root access to configure your Apache server to alter the document root. However, there is a workaround by using the htaccess file.

Once this is done, open up your web browser and type: [domain-name]/install.php

Note: replace [domain-name] with your own (for example: https://my-domain.com) 

Now you should be able to see the installation page. Go through each step and fill out the form to setup and install your site. 

Well done! if you get this far you have install a complete shopping cart (Drupal 8 + Drupal Commerce). 

But we are not done yet. It seems this script is a little dated so it installs Drupal 8 but we want Drupal 9. 

To do this, open up /mystore/composer.json.

delete these lines:

    "require-dev": {
        "drupal/core-dev": "^8.9.0",
        "zaporylie/composer-drupal-optimizations": "^1.1"
    },

delete all the require, then copy and paste this to replace it:

 "require": {
        "php": ">=7.1",
        "ext-curl": "*",
        "composer/installers": "^1.9",
        "cweagans/composer-patches": "^1.6.5",
        "drupal/core": "9.1.2 as 8.9.0",
        "drupal/core-composer-scaffold": "^9",
        "drupal/core-recommended": "^9",
        "drupal/commerce": "^2.0",
        "drupal/search_api": "^1.0",
        "drupal/swiftmailer": "^2.0",
        "drupal/token": "^1.0",
        "drupalcommerce/commerce_base": "dev-8.x-1.x",
        "drush/drush": "^9.7.1 | ^10.0.0",
        "oomphinc/composer-installers-extender": "^2.0",
        "webflo/drupal-finder": "^1.0.0",
        "webmozart/path-util": "^2.3",
        "zaporylie/composer-drupal-optimizations": "^1.1"
    },

Now type and run:

composer update

Once successfully upgraded to Drupal 9, the next thing to do is to run the update script in your web browser, ie, [domain-name]/update.php 

Note: If the update complains about the config setting directory, you need to delete: $config_directories['sync'] = '../config/sync'; and replace it with $settings['config_sync_directory'] = '../config/sync';

Now you can go back and run your update script (ie, https://domain-name.com/update.php)

You will have pending updates, go ahead and click update. 

Congratulations! you have completed installation and running on Drupal 9 latest version.

As a bonus, there is a demo site you can install. This can be very helpful to see how functionality and features are built out on Drupal Commerce. https://github.com/drupalcommerce/demo-project 

To install the demo version:

Type and run:

composer create-project drupalcommerce/demo-project demo-commerce --stability dev --no-interaction

You can go ahead and install Drupal Commerce via web browser. 

What you get in this demo are:

This demo version is a bit out of date so do not try and upgrade to run with Drupal 9. It will break the site unless you know how to update some of the modules to make it compatible with Drupal 9. 

There might still be some issues with this demo version but it mostly works really well. Let's hope Commerce Kickstart distribution for Drupal 9 version will be released soon.

You might also want to check out these extra modules to extend your shopping cart: http://duvien.com/blog/extra-modules-drupal-commerce-extend-drupal-89-online-stores 

 

Cacha (not verified), 15 Feb 2022 - 6:17pm
Hello, when I try to load with composer belgrade it gives me an error that I don't know how to solve.

composer require 'drupal/belgrade:^1.1'

Error: [UnexpectedValueException] Could not parse version constraint 1.1': Invalid version string "1.1'"

I've done composer self-update and then --prefer-dist but it does not solve the problem, could you help me?
Thank you

The content of this field is kept private and will not be shown publicly.
Your email address will be kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.