gally / sylius-plugin
Sylius connector for Gally
Installs: 267
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 6
Forks: 5
Open Issues: 0
Type:sylius-plugin
Requires
- php: ^8.0
- gally/gally-php-rest-sdk: 1.3.1
- sylius/sylius: ^1.12
Requires (Dev)
- behat/behat: ^3.6.1
- behat/mink-selenium2-driver: ^1.4
- dmore/behat-chrome-extension: ^1.3
- dmore/chrome-mink-driver: ^2.7
- friends-of-behat/mink: ^1.8
- friends-of-behat/mink-browserkit-driver: ^1.4
- friends-of-behat/mink-debug-extension: ^2.0.0
- friends-of-behat/mink-extension: ^2.4
- friends-of-behat/page-object-extension: ^0.3
- friends-of-behat/suite-settings-extension: ^1.0
- friends-of-behat/symfony-extension: ^2.1
- friends-of-behat/variadic-extension: ^1.3
- friendsofphp/php-cs-fixer: *
- phpspec/phpspec: ^7.2
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: ^1.8.1
- phpstan/phpstan-doctrine: 1.3.37
- phpstan/phpstan-strict-rules: ^1.3.0
- phpstan/phpstan-webmozart-assert: ^1.2.0
- phpunit/phpunit: ^9.5
- polishsymfonycommunity/symfony-mocker-container: ^1.0
- sylius-labs/coding-standard: ^4.2
- symfony/browser-kit: ^5.4 || ^6.0
- symfony/debug-bundle: ^5.4 || ^6.0
- symfony/dotenv: ^5.4 || ^6.0
- symfony/flex: ^2.2.2
- symfony/intl: ^5.4 || ^6.0
- symfony/web-profiler-bundle: ^5.4 || ^6.0
- vimeo/psalm: 5.9.0
Conflicts
- symfony/framework-bundle: 6.2.8
This package is auto-updated.
Last update: 2024-12-18 16:28:35 UTC
README
Requirements
- Gally version: 1.3.x
- Sylius version: 1.12.x
Usage
- Install the
gally/sylius-plugin
bundle- Run
composer require gally/sylius-plugin
- Add the bundle in
config/bundles.php
. You must put it afterSyliusGridBundle
[...] Gally\SyliusPlugin\GallySyliusPlugin::class => ['all' => true],
- Import the Gally Sylius bundle configuration by adding the following lines to the imports section of
config/packages/_sylius.yaml
- { resource: "@GallySyliusPlugin/Resources/config/config.yml" }
- Import admin routes by creating a file
config/routes/gally_admin.yaml
gally_admin: resource: "@GallySyliusPlugin/Resources/config/admin_routing.yml" prefix: /admin
- Import shop routes by creating a file
config/routes/gally_shop.yaml
gally_shop: resource: "@GallySyliusPlugin/Resources/config/shop_routing.yml" prefix: /{_locale}
- Implement the
Gally\SyliusPlugin\Model\GallyChannelInterface
andGally\SyliusPlugin\Model\GallyChannelTrait
in your Channel Entitysrc/App/Entity/Channel/Channel.php
.
<?php declare(strict_types=1); namespace App\Entity\Channel; use Doctrine\ORM\Mapping as ORM; use Gally\SyliusPlugin\Model\GallyChannelInterface; use Gally\SyliusPlugin\Model\GallyChannelTrait; use Sylius\Component\Core\Model\Channel as BaseChannel; #[ORM\Entity] #[ORM\Table(name: 'sylius_channel')] class Channel extends BaseChannel implements GallyChannelInterface { use GallyChannelTrait; }
- Copy the templates from
vendor/gally/sylius-plugin/src/Resources/views/SyliusShopBundle/
totemplates/bundles/SyliusShopBundle/
. - 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
- Run
php bin/console doctrine:migrations:diff
andphp bin/console doctrine:migrations:migrate
to update the database schema - Open Sylius Admin, head to Configuration > Gally and configure the Gally endpoint (URL, credentials)
- Run
- Run this commands from your Sylius instance. This commands must be runned only once to synchronize the structure.
bin/console gally:structure:sync # Sync catalog et source field data with gally
- Run a full index from Sylius to Gally. This command can be run only once. Afterwards, the modified products are automatically synchronized.
bin/console gally:index # Index category and product entity to gally
- 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:
bin/console gally:structure:clean
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.