Data providers¶
Data providers define where product information is stored.
You can use one of the following data providers: the Repository data provider or the eContent data provider.
Repository vs. eContent data provider¶
Feature | Repository | eContent |
---|---|---|
Flexible data model | yes | yes |
Translations | yes | yes |
Interface for editing | yes | no |
Versioning | yes | no |
Fast imports | no | yes |
Support of large catalogs | no | yes |
Staging (live and temporary space) | no | yes |
Switching the data provider¶
You can switch the data provider either with the command line or manually. Only one data provider can be active at the same time.
Command-line switching¶
The ibexa:commerce:switch-data-provider
command switches between the Repository and eContent data provider.
It is useful especially for testing purposes.
The command takes the following options:
Option | Notes |
---|---|
--new-root-node |
The default values are: 56 for Repository data provider, 2 for eContent. |
--location-id |
The default value is 56 . This is the default Location ID of the "Product catalog" Content item. If you are using another Location ID, change this parameter. |
To switch to eContent data provider, use the following command:
1 2 3 |
|
To switch to the Repository data provider, use the following command:
1 |
|
After you execute the command, clear the cache.
Data provider switch process¶
Switching the data provider introduces the following changes to your project:
Changes to config/packages/ecommerce.yml
¶
1 2 3 |
|
Changes to the "Product catalog" Content item¶
The Product catalog's root node is set accordingly.
Manual switching¶
1. Load root element¶
First, ensure that you are loading the correct root element for your provider.
2. Configure search services¶
Change the alias for search services for every type (product, catalog, content).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
3. Set up search groups¶
Set up search groups and configuration accordingly.
Check the complete configuration from the vendor as well:
Siso/Bundle/SearchBundle/Resources/config/econtent_search.yml
Siso/Bundle/SearchBundle/Resources/config/ez_search.yml
The path for products in eContent is /2/
and for Repository it is /1/2
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
|