nedac / sylius-temporarily-out-of-stock-plugin
Sylius plugin that adds a ribbon to product images of products that are out of stock.
Installs: 4 019
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 2
Open Issues: 0
Type:sylius-plugin
Requires
- php: ^7.4 || ^8.0
- sylius/sylius: >=1.10.2 <1.11.0
- webmozart/assert: ^1.10
Requires (Dev)
- behat/behat: ^3.8
- dmore/chrome-mink-driver: ^2.8
- friends-of-behat/mink-extension: ^2.5
- friends-of-behat/page-object-extension: ^0.3
- friendsofsymfony/oauth-server-bundle: >2.0.0-alpha.0 ^2.0@dev
- matthiasnoback/symfony-config-test: ^4.2
- matthiasnoback/symfony-dependency-injection-test: ^4.2
- mockery/mockery: ^1.4
- phpstan/extension-installer: ^1.1
- phpstan/phpstan: ^0.12
- phpstan/phpstan-doctrine: ^0.12
- phpstan/phpstan-mockery: ^0.12.14
- phpstan/phpstan-phpunit: ^0.12.19
- phpstan/phpstan-strict-rules: ^0.12.0
- phpstan/phpstan-webmozart-assert: ^0.12
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.6
README
This plugin adds a ribbon clarifying that a product is out of stock to the product cards and main image on the product detail page.
Supported Sylius versions:
1.10 |
NOTE: This plugin requires PHP 7.4 or up
Installation:
-
Install using composer:
composer require nedac/sylius-temporarily-out-of-stock-plugin
-
If the
ProductRepository
is overridden in the project, then make sure it uses thetrait
:<?php # src/Repository/ProductRepository.php declare(strict_types=1); namespace App\Repository; use Nedac\SyliusTemporarilyOutOfStockPlugin\Repository\ProductRepositoryTrait; use Sylius\Bundle\CoreBundle\Doctrine\ORM\ProductRepository as BaseProductRepository; final class ProductRepository extends BaseProductRepository { use ProductRepositoryTrait; }
If the
ProductRepository
is not overridden in the project, please use the repository of this plugin:# config/packages/_sylius.yaml # ... sylius_product: resources: product: classes: repository: Nedac\SyliusTemporarilyOutOfStockPlugin\Repository\ProductRepository # ...
-
Install assets:
bin/console sylius:install:assets