vaachar / sylius-featured-products-plugin
Plugin to configure products that should be featured in a channel.
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Type:sylius-plugin
Requires
- php: ^7.4
- sylius/sylius: ^1.8
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-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
- lakion/mink-debug-extension: ^1.2.3
- phpspec/phpspec: ^6.1
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: 0.12.25
- phpstan/phpstan-doctrine: 0.12.13
- phpstan/phpstan-strict-rules: ^0.12.0
- phpstan/phpstan-webmozart-assert: 0.12.4
- phpunit/phpunit: ^8.5
- sensiolabs/security-checker: ^6.0
- sylius-labs/coding-standard: ^3.1
- symfony/browser-kit: ^4.4
- symfony/debug-bundle: ^4.4|^5.0
- symfony/dotenv: ^4.4|^5.0
- symfony/intl: ^4.4|^5.0
- symfony/web-profiler-bundle: ^4.4|^5.0
- symfony/web-server-bundle: ^4.4|^5.0
- vimeo/psalm: 3.11.4
This package is auto-updated.
Last update: 2024-12-16 12:45:10 UTC
README
Sylius Featured Products Plugin
Plugin to configure products that should be featured in a channel.
Quickstart Installation
- Require plugin via Composer
composer require vaachar/sylius-featured-products-plugin
- Inlcude config.yaml in
_sylius.yaml
- { resource: "@SyliusFeaturedProductsPlugin/Resources/config/config.yaml" }
- Use trait and add interface to
src/Entity/Product/Product.php
class Product extends BaseProduct implements HasFeaturedProductInterface
{
use FeaturedProductTrait;
...
}
- Execute migrations
bin/console doctrine:migrations:migrate
- Use twig macro to add featured products to a page
{{ sylius_render_featured_products() }}
Example:
<h2 class="ui huge horizontal section divider inverted header">{{ 'sylius_featured_products_plugin.ui.featured_products'|trans }}</h2>
<div {{ sylius_test_html_attribute('featured-products') }}>
{{ sylius_render_featured_products() }}
</div>
<div class="ui hidden divider"></div>