-
Require plugin with composer:
composer require setono/gift-card-plugin
-
Import configuration:
imports: - { resource: "@SetonoSyliusGiftCardPlugin/Resources/config/config.yml" }
-
Import routing:
setono_sylius_gift_card_plugin: resource: "@SetonoSyliusGiftCardPlugin/Resources/config/routing.yml"
-
Add plugin class to your
AppKernel
:$bundles = [ new \Setono\SyliusGiftCardPlugin\SetonoSyliusGiftCardPlugin(), ];
-
Update your database:
$ bin/console doctrine:migrations:diff $ bin/console doctrine:migrations:migrate
-
Copy templates from
vendor/setono/gift-card-plugin/src/Resources/views/SyliusShopBundle/
toapp/Resources/SyliusShopBundle/views/
andvendor/setono/gift-card-plugin/src/Resources/views/SyliusAdminBundle/
toapp/Resources/SyliusAdminBundle/views/
. -
Overwrite the grid
sylius_admin_product
:sylius_grid: grids: sylius_admin_product: actions: main: create: type: links label: sylius.ui.create options: class: primary icon: plus header: icon: cube label: sylius.ui.type links: simple: label: sylius.ui.simple_product icon: plus route: sylius_admin_product_create_simple configurable: label: sylius.ui.configurable_product icon: plus route: sylius_admin_product_create gift_card: label: setono_sylius_gift_card_plugin.ui.gift_card icon: plus route: setono_sylius_gift_card_plugin_admin_product_create_gift_card
-
Install assets:
bin/console assets:install --symlink web
-
Clear cache:
bin/console cache:clear
$ composer install
$ cd tests/Application
$ yarn install
$ yarn run gulp
$ bin/console assets:install web -e test
$ bin/console doctrine:database:create -e test
$ bin/console doctrine:schema:create -e test
$ bin/console server:run 127.0.0.1:8080 -d web -e test
$ bin/behat
$ bin/phpspec run
Learn more about our contribution workflow on http://docs.sylius.org/en/latest/contributing/.