Download the PHP package behappy/elasticsearch-plugin without Composer
On this page you can find all versions of the php package behappy/elasticsearch-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download behappy/elasticsearch-plugin
More information about behappy/elasticsearch-plugin
Files in behappy/elasticsearch-plugin
Package elasticsearch-plugin
Short Description BitBag Elasticsearch plugin for Sylius.
License MIT
Informations about the package elasticsearch-plugin
Overview
Working Sylius Elasticsearch integration based on FOSElasticaBundle. The main goal of this plugin is to support filtering products by
options, attributes, taxons, channels and name in the front product list page. It totally replaces the default Sylius sylius_shop_product_index
route.
What is more, the plugin has a nice Sylius-oriented architecture that allows mapping resources to the Elastic document easier. It is flexible as well, so that you can customize the existing features for your specific business needs.
Support
You can order our support on this page.
We work on amazing eCommerce projects on top of Sylius and Pimcore. Need some help or additional resources for a project? Write us an email on [email protected] or visit our website! :rocket:
Demo
We created a demo app with some useful use-cases of the plugin! Visit demo.bitbag.shop to take a look at it.
The admin can be accessed under demo.bitbag.shop/admin link and sylius: sylius
credentials.
Installation
Add plugin dependencies to your AppKernel.php file:
Import required config in your app/config/config.yml
file:
Import routing on top of your app/config/routing.yml
file:
With a elasticsearch server running, execute following command:
Note: If you are running it on production, add the -e prod
flag to this command. Elastic are created with environment suffix.
Usage
Rendering the shop products list
When you go now to the /{_locale}/products/taxon/{slug}
page, you should see a totally new set of filters. You should see something like this:

You might also want to refer the horizontal menu to a new product list page. Follow below instructions to do so:
- If you haven't done it yet, create a
_horizontalMenu.html.twig
file inapp/Resources/SyliusShopBundle/views/Taxon
directory. - Replace
sylius_shop_product_index
withbitbag_sylius_elasticsearch_plugin_shop_list_products
. - Clean your cache with
bin/console cache:clear
command. - :tada:
Excluding options and attributes in the filter menu
You might not want to show some specific options or attributes in the menu. You can set specific parameters for that:
By default all options and attributes are indexed. After you change these parameters, remember to run bin/console fo:el:po
command again
(a shortcut for fos:elastica:populate
).
Reindexing
By default, current indexes listen on all Doctrine events. You can override this setting for each index by overriding index definition in your config.yml
file:
Indexes with bitbag_shop_product
, bitbag_attribute_taxons
and bitbag_option_taxons
keys are available so far.
Customization
Available services you can decorate and forms you can extend
Parameters you can override in your parameters.yml(.dist) file
Testing
Contribution
Learn more about our contribution workflow on http://docs.sylius.org/en/latest/contributing/.