Hi commerce guys,
Why if
I choose to install commerce 2 from scratch :
composer create-project
all the files structure modify?
for example :
the vendor folder moves external from the root web folder?
If I will need to upgrade drupal I will be confused what to do....

There is a way to install drupal commerce the classic way? like:

  1. install commerce module
  2. install all dependecis modules
  3. copy the commerceguys library folder
  4. enable all the internal commerce modules

second:

if i coose to install commerce to exsisting site but without drupal console,
what is the right way to enable commerce sub modules?

thanks a lot.

Comments

ntigh52 created an issue. See original summary.

bojanz’s picture

Status: Active » Fixed

The project-base has an improved folder structure that is more suited for modern websites that are managed by Composer.
For example, the vendor folder is moved above the web root for additional security.

You update Drupal core using "composer update drupal/core --with-dependencies".
No other methods are supported after you install a module via Composer for the first time.
(drupal pm-update will be removed in favor of Composer soon, so that dilemma will soon disappear).

There is no way to manually install Commerce without Composer, because there's no way to manually install a PHP library without Composer. Think of it as mandatory Drush that downloads core, modules, and keeps them up to date.

You are free to use any method (admin/modules, Drush, Console) to enable Commerce, as long as you used Composer to download it.

ntigh52’s picture

Thanks Bojan,
on commerce 1 the order to install commerce from admin console was:

  1. Commerce and Commerce UI
  2. Customer and Customer UI
  3. Price
  4. Line Item and Line Item UI
  5. Order and Order UI
  6. Checkout, Payment, Product
  7. Product Reference
  8. Cart and Product Pricing
  9. Tax
  10. Product UI
  11. Tax UI
  12. Payment UI
  13. Product Pricing UI

On commerce 2 there is no neccassery order to enable them?
Thanks again.

mglaman’s picture

There wasn't really an order in 1.x; Drupal would resolve dependencies. Since there is no decoupled UI module in 2.x, just enable as needed and any prompted dependencies.

ntigh52’s picture

Greate! Thanks.

So, Just for final understanding,
If I install commerce from scratch, the right way for modern websites is to locate the vendor folder above the web root folder.
But, when adding commerce module to an existing drupal 8 structure, the vendor folder will stay on the web root folder.
Am I right?
Thanks a lot.

mglaman’s picture

I think your best bet is to give it a try and see. vendor outside of the docroot, but the application (Drupal) lives in web and can load files. Visit https://github.com/drupalcommerce/project-base, run composer create-project drupalcommerce/project-base some-dir --stability dev --no-interaction and see how it looks.

bojanz’s picture

But, when adding commerce module to an existing drupal 8 structure, the vendor folder will stay on the web root folder.
Am I right?

Correct.

ntigh52’s picture

Thanks a lot Matt,
Thanks a lot Bojan,
Thanks a lot Commerce Guys,

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.