Upgrade the ProductPageSearch module
Edit on GitHubUpgrading from version 3.11.* to version 3.12.*
Prerequisites
This migration guide is a part of the Search migration effort. Prior to upgarding this module, make sure you have completed all the steps from the Search Migration Guide.
To upgrade the module, do the following:
- Update the module using Composer:
composer update spryker/product-page-search
- Remove
ProductPageSearchDependencyProvider::getMapExpanderPlugins()
method. - Enable the new abstract product map expander plugins:
Pyz\Zed\ProductPageSearch
<?php
namespace Pyz\Zed\ProductPageSearch;
...
use Spryker\Zed\ProductPageSearch\Communication\Plugin\ProductPageSearch\Elasticsearch\ProductCategoryMapExpanderPlugin;
use Spryker\Zed\ProductPageSearch\Communication\Plugin\ProductPageSearch\Elasticsearch\ProductImageMapExpanderPlugin;
use Spryker\Zed\ProductPageSearch\Communication\Plugin\ProductPageSearch\Elasticsearch\ProductPriceMapExpanderPlugin;
use Spryker\Zed\ProductPageSearch\ProductPageSearchDependencyProvider as SprykerProductPageSearchDependencyProvider;
class ProductPageSearchDependencyProvider extends SprykerProductPageSearchDependencyProvider
{
...
/**
* @return \Spryker\Zed\ProductPageSearchExtension\Dependency\Plugin\ProductAbstractMapExpanderPluginInterface[]
*/
protected function getProductAbstractMapExpanderPlugins(): array
{
return [
new ProductPriceMapExpanderPlugin(),
new ProductCategoryMapExpanderPlugin(),
new ProductImageMapExpanderPlugin(),
];
}
}
- Remove deprecated plugin usages (if any) from
Pyz\Zed\Search\SearchDependencyProvider
:
Spryker\Zed\ProductPageSearch\Communication\Plugin\Search\ProductConcretePageMapPlugin
Spryker\Zed\ProductPageSearch\Communication\Plugin\Search\ProductPageMapPlugin
Upgrading from version 2.* to version 3.*
ProductPageSearch
3.0.0 got separate search index for Concrete Products. It includes database table and ElasticSearch index.
Estimated migration time: ~2h
To perform the migration, follow the steps:
- Run the database migration:
vendor/bin/console propel:install
- Generate transfers:
vendor/bin/console transfer:generate
- Install search:
vendor/bin/console search:setup
- Sync concrete products data with ElasticSearch:
vendor/bin/console data:import:product-concrete
or
vendor/bin/console event:trigger -r product_concrete
Thank you!
For submitting the form