PHP code example of setono / sylius-reserve-stock-plugin
1. Go to this page and download the library: Download setono/sylius-reserve-stock-plugin library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
setono / sylius-reserve-stock-plugin example snippets
return [
// ...
Setono\SyliusReserveStockPlugin\SetonoSyliusReserveStockPlugin::class => ['all' => true],
// ...
];
declare(strict_types=1);
namespace App\Repository\OrderItemRepository;
use Setono\SyliusReserveStockPlugin\Repository\InCartQuantityForProductVariantOrderItemRepositoryAwareInterface;
use Setono\SyliusReserveStockPlugin\Repository\ProductVariantCartOrderItem;
use Sylius\Bundle\OrderBundle\Doctrine\ORM\OrderItemRepository as BaseOrderItemRepository;
final class OrderItemRepository extends BaseOrderItemRepository implements InCartQuantityForProductVariantOrderItemRepositoryAwareInterface
{
use ProductVariantCartOrderItem; // Load trait here
}