Install the CMS + Product Lists + Catalog feature
Edit on GitHubThis document describes how to integrate the CMS + Product Lists + Catalog feature into a Spryker project.
Install feature core
Follow the steps below to install the CMS + Product Lists + Catalog feature core.
Prerequisites
To start feature integration, integrate the required features:
NAME | VERSION | INTEGRATION GUIDE |
---|---|---|
Cms | 202204.0 | Install the CMS feature |
Product Lists | 202204.0 | Product Lists feature integration |
Catalog | 202204.0 | |
Customer | 202204.0 |
1) Install the required modules using Composer
Install the required modules:
composer require spryker/customer-catalog:"^1.0.0" --update-with-dependencies
Verification
Make sure that the following modules were installed:
MODULE | EXPECTED DIRECTORY |
---|---|
CustomerCatalog | vendor/spryker/customer-catalog |
Configure the catalog search count query
Add the following plugins to your project:
PLUGIN | SPECIFICATION | PREREQUISITES | NAMESPACE |
---|---|---|---|
ProductListQueryExpanderPlugin | Extends a search query by filtering down results to match the current customer’s product restrictions. | None | \Spryker\Client\CustomerCatalog\Plugin\Search\ProductListQueryExpanderPlugin |
src/Pyz/Client/Catalog/CatalogDependencyProvider.php
<?php
namespace Pyz\Client\Catalog;
use Spryker\Client\Catalog\CatalogDependencyProvider as SprykerCatalogDependencyProvider;
use Spryker\Client\CustomerCatalog\Plugin\Search\ProductListQueryExpanderPlugin;
class CatalogDependencyProvider extends SprykerCatalogDependencyProvider
{
/**
* @return \Spryker\Client\Search\Dependency\Plugin\QueryExpanderPluginInterface[]
*/
protected function createCatalogSearchCountQueryExpanderPlugins(): array
{
return [
new ProductListQueryExpanderPlugin(),
];
}
}
Verification
Make sure that the number of products on the catalog tab item is correct according to the customer’s assigned product lists.
Thank you!
For submitting the form