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