Search
Last updated
Last updated
About
Team© 2024 Sylius. All Rights Reserved
Product search is a common feature in eCommerce systems, and Sylius offers a simple solution through its grid filter functionality. For more advanced use cases, you can extend this functionality or integrate it with ElasticSearch.
For basic product search needs, Sylius provides search filters within its grids. For example, you can search for products by name in a product category using the grid filter.
Here’s an example configuration for the product grid search:
This configuration allows users to search by product names that contain the string entered in the search bar.
Here’s an example of what the search bar looks like:
In many shops, a more sophisticated search might be needed. You may want to add filters for price, reviews, sizes, or colors.
If you want to extend the built-in search functionality, you can refer to:
The GridBundle Documentation
These resources will guide you on how to modify and extend Sylius grid filters to suit your specific needs.
If the grid filtering functionality does not meet your requirements, and you need a more advanced search solution, you can integrate ElasticSearch into your Sylius project.
For this, you can use the BitBagCommerce/SyliusElasticsearchPlugin. This plugin extends Sylius functionalities with ElasticSearch, allowing for faster and more complex searches.
Install the plugin via Composer:
Set up the ElasticSearch server.
Configure ElasticSearch in your Sylius application.
For detailed instructions, refer to the plugin's README documentation on GitHub.