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 tosearchableProduct
anymore. -
ProductSearchFacade::saveProductSearchPreferences()
was removed. Added separated create, update and clean methods instead. -
Added
spy_product_search_attribute
new database table for product attribute search filter handling. To get the database changes you’ll need to runvendor/bin/console propel:diff
to generate a propel migration file, thenvendor/bin/console propel:migrate
to 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:build
to 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\Persistence
namespace. It’s important that you make sure that they are extending the base classes from the core, for example: -
Orm\Zed\ProductSearch\Persistence\SpyProductSearchAttribute
extendsSpryker\Zed\ProductSearch\Persistence\Propel\AbstractSpyProductSearchAttribute
, -
Orm\Zed\ProductSearch\Persistence\SpyProductSearchAttributeMap
extendsSpryker\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\ProductSearchConfigExtensionCollectorPlugin
in yourCollectorDependencyProvider
(under the\Spryker\Zed\Collector\CollectorDependencyProvider::STORAGE_PLUGINS
key). This will make sure to write the search and filter preferences changes into redis when the collectors run. To enable reading them you’ll also need to registerSpryker\Zed\ProductSearch\Communication\Plugin\ProductSearchConfigExtensionCollectorPlugin
inPyz\Client\Search\SearchDependencyProvider::createSearchConfigExpanderPlugins()
.
Thank you!
For submitting the form