Download the PHP package webgriffe/sylius-back-in-stock-notification-plugin without Composer
On this page you can find all versions of the php package webgriffe/sylius-back-in-stock-notification-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download webgriffe/sylius-back-in-stock-notification-plugin
More information about webgriffe/sylius-back-in-stock-notification-plugin
Files in webgriffe/sylius-back-in-stock-notification-plugin
Package sylius-back-in-stock-notification-plugin
Short Description Timely inform customers and guest visitors when a product return in stock
License MIT
Informations about the package sylius-back-in-stock-notification-plugin
Back in Stock Notification Plugin
Plugin that add the possibility to receive an email notification when a product return in stock
Features
Subscribe to get a Notification when a product return in stock
View your subscriptions in the apposite section of your account
View your client subscriptions in the apposite admin section
Requirements
- PHP
^8.0
- Sylius
^1.11.2
Installation
-
Run
composer require webgriffe/sylius-back-in-stock-notification-plugin --no-scripts
. -
Add the plugin to the
config/bundles.php
file: -
Import the plugin routes by creating a file in
config/routes/webgriffe_sylius_back_in_stock_notification_plugin.yaml
with the follwing content: -
Import required packages config in your
config/packages/webgriffe_sylius_back_in_stock_notification_plugin.yaml
file: -
Update the database schema and install assets:
-
Install the plugin JS assets by adding the source to your webpack configuration:
-
Run yarn build:
- Clear cache:
Configuration
This module sends mail using a Symfony Command. Unfortunately, the command line context does not know about your VirtualHost or domain name. To fix this, the Command loads the hostname from the Subscription's channel, if nothing set it defaults to localhost
. In console commands, URLs use http by default. You can change this globally with these configuration parameters:
-
Edit the
config/services.yml
file by adding the following content: - As said early this module provides a command that check the stock of the product. You have to set the command
bin/console webgriffe:back-in-stock-notification:alert
in the crontab, once a day is enough:
Optional Configuration
If you want to use our Behat defined steps you have to include our Behat class in your autoloader-dev. To achieve this adds the following line to your composer.json
:
Contributing
To contribute to this plugin clone this repository, create a branch for your feature or bugfix, do your changes and then make sure al tests are passing.
To be able to setup a plugin's database, remember to configure you database credentials in tests/Application/.env
and tests/Application/.env.test
.
Running plugin tests
PHPUnit
PHPSpec
Behat (non-JS scenarios)
Behat (JS scenarios)
-
Start Headless Chrome:
-
Install SSL certificates (only once needed) and run test application's webserver on
127.0.0.1:8080
: - Run Behat:
Static Analysis
Psalm
PHPStan
Coding Standard
Opening Sylius with your plugin
-
Using
test
environment: - Using
dev
environment:
License
This plugin is under the MIT license. See the complete license in the LICENSE file.
Credits
Developed by Webgriffe®.
All versions of sylius-back-in-stock-notification-plugin with dependencies
doctrine/dbal Version ^2.7 || ^3.0
doctrine/migrations Version ^3.0
doctrine/orm Version ^2.13
psr/log Version ^2.0
sylius/mailer-bundle Version ^1.8 || ^2.0
sylius/resource Version ^1.9
sylius/resource-bundle Version ^1.9
sylius/sylius Version ^1.12
symfony/config Version ^5.4 || ^6.0
symfony/console Version ^5.4 || ^6.0
symfony/dependency-injection Version ^5.4 || ^6.0
symfony/form Version ^5.4 || ^6.0
symfony/framework-bundle Version ^5.4 || ^6.0
symfony/http-foundation Version ^5.4 || ^6.0
symfony/http-kernel Version ^5.4 || ^6.0
symfony/options-resolver Version ^5.4 || ^6.0
symfony/routing Version ^5.4 || ^6.0
symfony/translation-contracts Version ^2.0
symfony/validator Version ^5.4 || ^6.0
symfony/webpack-encore-bundle Version ^1.15
twig/twig Version ^2.0 || ^3.0
webmozart/assert Version ^1.10