Migration guide - ProductPageSearch

Edit on GitHub

Upgrading 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:

  1. Update the module with composer:
composer update spryker/product-page-search
  1. Remove ProductPageSearchDependencyProvider::getMapExpanderPlugins() method.
  2. 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(),
        ];
    }
}
  1. 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.

To perform the migration, follow the steps:

  1. Run the database migration:
vendor/bin/console propel:install
  1. Generate transfers:
>vendor/bin/console transfer:generate
  1. Install search:
>vendor/bin/console search:setup
  1. Sync concrete products data with ElasticSearch:
>vendor/bin/console data:import:product-concrete

or

vendor/bin/console event:trigger -r product_concrete

Estimated migration time: ~2h