Hi there,
I have installed the commerce_demo module in three seperate ways and only the last was succesfull. Perhaps a small manual can be added to the frontpage to prevent others from having the same issue.
Method 1: Installing with commerce_base installation profile
This does not work as both the installation profile and demo module provide some pieces of configuration (menu blocks, search index, etc) that collide when installing both.
Method 2: Installing with minimal installation profile (d8 core)
This seems to install but doesn't create any products.
Method 3: Installing with the standard installation profile (d8 core)
Installation succeeded and i have products to view.
I'll give you some text to copy, edit, ignore:
Installation instructions
The commerce demo module needs to be installed with at least the standard drupal core installation profile. Using the minimal profile will not result in a fully operational demo store. Using any other installation profile that is based on Drupal core standard should work but can collide with existing configuration.
Installing the module after a clean Drupal core installation can be a demanding operation for your laptop, desktop, webserver. It is recommended to expand PHP's minimum execution time to at least 300 seconds.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 2986537-12.patch | 7.3 KB | mglaman |
| #10 | 2986537-10.patch | 7.33 KB | mglaman |
| #8 | 2986537-8.patch | 6.47 KB | mglaman |
| #5 | 2986537-5.patch | 6.5 KB | mglaman |
| #4 | 2986537-4.patch | 5.89 KB | mglaman |
Comments
Comment #2
bojanz commentedWe generally install commerce_demo as a part of the whole parent distro, the Composer demo-project:
https://github.com/drupalcommerce/demo-project
Other installation methods will be perfected over time. We'll probably need separate issues for commerce_base and minimal. I am surprised that commerce_base doesn't work, since it's mostly a clone of standard with the Commerce modules added to the install list.
Comment #3
mglamanExploring this a bit.
The profile in the Composer template provides block placement and sample pages. This is the glue which allows proper placement of blocks for the demo.
It discussion with bojanz, it would make sense to just place Belgrade specific configuration into the
config/optionaldirectory, removing the need to use the template. However, that does not help with Bartik or other future themes the demo could support "out of the box" (or themes built for the demo.)An idea would be a "theme installer service" to dynamically place blocks in proper regions for more custom themes. Instead of maintaining hundreds of optional config. This would invoke on
commerce_demo_modules_installedwhen the module itself is installed, or whenever a theme is installed.EDIT: This is blocked on #2988636: Automatically swap out the default cart block plugin definition's class.. The Belgrade cart block config targets that plugin. Instead it should target the one provided by Commerce itself.
Comment #4
mglamanThis is an initial patch with some basic testing. Whenever the module is installed, blocks are set up for the active theme. Whenever a theme is installed, its blocks are set up and placed.
I need to test with a basic installation and changing themes on an active site.
Comment #5
mglamanHandles changing a theme when the site is installed. Note
Comment #6
mglamanI tested Method 3 as mentioned. It works as documented, but no blocks placed.
Comment #7
mglaman:) because the active theme is "seven", I need to check
$default_theme = \Drupal::config('system.theme')->get('default');Comment #8
mglamanFixes scenario 3. Working on 2 (minimal install)
Comment #9
mglamanWhile testing, I wasn't able to reproduce the issues on the minimal install.
But we should also document:
Comment #10
mglamanUpdated patch after discussing w/ bojanz.
Also retitling. The main focus is ensuring parts of the demo exist regardless if it is installed through our demo template or not.
Comment #11
mglamantheme_handler
We should account for this in the main block definitions when placing blocks.It can be removed, we account for existing blocks.
Comment #12
mglamanNew patch. Also ensures block is enabled.
Comment #14
mglamanComment #16
bojanz commentedOpened followup: #2990498: Can't be installed together with Belgrade on a regular install profile.