Upgrade the ProductSearch module
Edit on GitHubUpgrading from version 3.* to version 4.*
-
Requires version ^4.0.0 of Product and ^5.0.0 of Search bundles.
-
ProductSearchFacade::activateProductSearch()andProductSearchFacade::deactivateProductSearch()are not connected tosearchableProductanymore. -
ProductSearchFacade::saveProductSearchPreferences()was removed. Added separated create, update and clean methods instead. -
Added
spy_product_search_attributenew database table for product attribute search filter handling. To get the database changes you’ll need to runvendor/bin/console propel:diffto generate a propel migration file, thenvendor/bin/console propel:migrateto apply it. Make sure before the second command that you checked and cleaned up the content of the migration file if necessary. -
Along with the database changes you’ll need to run
vendor/bin/console propel:model:buildto generate the necessary propel classes for the changes. After running that command you’ll find some new classes in your project under\Orm\Zed\ProductSearch\Persistencenamespace. It’s important that you make sure that they are extending the base classes from the core, for example:Orm\Zed\ProductSearch\Persistence\SpyProductSearchAttributeextendsSpryker\Zed\ProductSearch\Persistence\Propel\AbstractSpyProductSearchAttributeOrm\Zed\ProductSearch\Persistence\SpyProductSearchAttributeMapextendsSpryker\Zed\ProductSearch\Persistence\Propel\AbstractSpyProductSearchAttributeMap
-
In order to activate the changes of the new product search and filter preferences Zed UIs, you’ll need to register the
Spryker\Zed\ProductSearch\Communication\Plugin\ProductSearchConfigExtensionCollectorPluginin yourCollectorDependencyProvider(under the\Spryker\Zed\Collector\CollectorDependencyProvider::STORAGE_PLUGINSkey). This will make sure to write the search and filter preferences changes into key-value storage (Redis or Valkey) when the collectors run. To enable reading them you’ll also need to registerSpryker\Zed\ProductSearch\Communication\Plugin\ProductSearchConfigExtensionCollectorPlugininPyz\Client\Search\SearchDependencyProvider::createSearchConfigExpanderPlugins().
Thank you!
For submitting the form