setono/sylius-restock-notification-plugin
最新稳定版本:v1.0.0-alpha
Composer 安装命令:
composer require setono/sylius-restock-notification-plugin
包简介
Plugin that allows customer to sign up for notifications when a product is back in stock
README 文档
README
This plugin allows customers to sign up for notifications when a product is back in stock.
Installation
composer require setono/sylius-restock-notification-plugin
Enable the plugin
Then, enable the plugin by adding it to the list of registered plugins/bundles
in the config/bundles.php file of your project before (!) SyliusGridBundle and the FrameworkBundle:
<?php # config/bundles.php return [ Setono\SyliusRestockNotificationPlugin\SetonoSyliusRestockNotificationPlugin::class => ['all' => true], Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], // ... Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true], ];
Import routes
Add this file to your config/routes directory:
# config/routes/setono_sylius_restock_notification.yaml setono_sylius_restock_notification: resource: "@SetonoSyliusRestockNotificationPlugin/Resources/config/routes.yaml"
Update your database schema
php bin/console doctrine:migrations:diff php bin/console doctrine:migrations:migrate
Maintenance
Pruning Old Notification Requests
The plugin includes a command to remove old restock notification requests that are no longer needed. By default, it removes requests that are older than 90 days.
# Using the default threshold (90 days) php bin/console setono:sylius-restock-notification:prune-requests # Specifying a custom threshold (e.g., 30 days) php bin/console setono:sylius-restock-notification:prune-requests --pruning-threshold=30
You can configure the default threshold in your application's configuration:
# config/packages/setono_sylius_restock_notification.yaml setono_sylius_restock_notification: pruning_threshold: 60 # Set the threshold to 60 days
统计信息
- 总下载量: 341
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-05-16