Download the PHP package gally/sylius-plugin without Composer
On this page you can find all versions of the php package gally/sylius-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gally/sylius-plugin
More information about gally/sylius-plugin
Files in gally/sylius-plugin
Package sylius-plugin
Short Description Sylius connector for Gally
License OSL-3.0
Homepage https://elasticsuite.io
Informations about the package sylius-plugin
Gally Plugin for Sylius
Requirements
- Gally version: 2.1.x
- Sylius version: 2.0.x
Usage
-
Install the
gally/sylius-pluginbundle- Run
composer require gally/sylius-plugin -
Add the bundle in
config/bundles.php. You must put it afterSyliusGridBundle -
Import the Gally Sylius bundle configuration by adding the following lines to the imports section of
config/packages/_sylius.yaml -
Import admin routes by creating a file
config/routes/gally_admin.yaml -
Import shop routes by creating a file
config/routes/gally_shop.yaml -
Implement the
Gally\SyliusPlugin\Model\GallyChannelInterfaceandGally\SyliusPlugin\Model\GallyChannelTraitin your Channel Entitysrc/App/Entity/Channel/Channel.php. -
Copy the bundle assets (Javascript & CSS files):
- Run
php bin/console assets:install - Run
php bin/console sylius:install:assets - Run
php bin/console sylius:theme:assets:install
- Run
-
Alternative: install assets via Webpack Encore (recommended for Sylius 2.x)
- Add the plugin and its JS SDK as npm dependencies in your app's
package.json:
Why
link:instead offile:?
Yarn v1 has a known bug withfile:local packages that declare their own npm dependencies (such as@elastic-suite/gally-sdk): it tries to scan anode_modulesfolder inside its cache copy of the package, which does not exist, causing anEACCES/ENOENTerror.
Usinglink:creates a simple symlink tovendor/gally/sylius-pluginwithout going through the cache.@elastic-suite/gally-sdkmust then be declared explicitly at the root level so that webpack can resolve it.Development only: if you are working on the plugin sources directly (i.e. pointing to
link:packages/GallyPlugininstead oflink:vendor/gally/sylius-plugin), you must also add apostinstallscript to build the@elastic-suite/gally-sdkdist files, which are not pre-compiled on the GitHub branch:- Add the Gally shop entry point and the SDK IIFE copy in your app's
webpack.config.js:
The
copyFiles()call exposesgally-sdk.global.jsas a standalone IIFE script (available aswindow.GallySDK) for use in Twig templates via{{ asset('build/app/shop/gally/gally-sdk.global.js') }}.- Install JS dependencies and build assets:
- Without Docker (from the Sylius root directory):
-
With Docker (via the
nodejscontainer):The
nodejscontainer automatically runsyarn install && yarn buildand mounts the project into/srv/sylius.
- Add the plugin and its JS SDK as npm dependencies in your app's
- Run
php bin/console doctrine:migrations:migrateto update the database schema - Open Sylius Admin, head to Configuration > Gally and configure the Gally endpoint (URL, credentials), after that enable Gally on your channel (Configuration > Channel > Edit)
- Run
-
Run this commands from your Sylius instance. This commands must be runned only once to synchronize the structure.
-
Run a full index from Sylius to Gally. This command can be run only once. Afterwards, the modified products are automatically synchronized.
- At this step, you should be able to see your product and source field in the Gally backend.
- They should also appear in your Sylius frontend when searching or browsing categories.
- And you're done !
- You can also run the command to clean data that are not present in sylius anymore:
noUiSlider
This bundle includes the noUiSlider distribution files. noUiSlider is "a lightweight, ARIA-accessible JavaScript range slider with multi-touch and keyboard support" which is used in this project for the price slider implementation.
All versions of sylius-plugin with dependencies
gally/gally-php-sdk Version 2.3.0
sylius/grid-bundle Version ^1.14.1
sylius/sylius Version ^2.0