Skip to content

Plugin with out of stock notification(for learning purposes only)

License

Notifications You must be signed in to change notification settings

mmularski/shopware-product-alert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Product Alert extension

This extension provides the functionality of "Out of stock notification".

If a product is out of stock, a user can sign to product alert notification which sends an email when this product is back to stock

Table of content

Documentation

Features

  • New form for customers who want to sign for notification when the product will back to stock
  • A grid in admin panel with a list of subscribers and products
  • Details how many subscribers are signed for a specific product
  • Customizable email template
  • The scheduled task for sending notifications (every 24 hours)
  • Button in the admin panel which can process notifications manually

Usage

Storefront

  1. As a customer you can sign to product alert notification(only for out of stock products - stock = 0).

    Form on a product page

Admin panel

  1. As an admin, you can view emails that are subscribed for a specific product.

    Admin grid

  2. After clicking for some row, you can view how many subscribers are signed for this specific product(for statistics purposes).

    Admin grid details

  3. Also if the admin wants to send notifications manually, it can be done by clicking the button above the grid. (By default there is a scheduled task which sends notifications every 24 hours)

  4. The module has its own email template for notification, so the admin can customize it for its needs.

    Admin email template

CLI

You can use CLI command to send notifications manually

$ bin/console product:alert:send

Compatibility

This plugin is compatible with Shopware 6.2

Setup

Downloading plugin

Using Composer (recommended)

Run composer require divante/product-alert in your project root directory

Copying files

Copy files from this repository (you can clone it or download as zip) to <root>/custom/plugins/DivanteProductAlert

Installation

Refresh plugin list

$ bin/console plugin:refresh

Install and activate the plugin

$ bin/console plugin:install --activate DivanteProductAlert

Clear the cache (sometimes invalidation is needed for the new routes to activate)

$ bin/console cache:clear

Tests

Tests are located in tests/ and configured in phpunit.xml in each folder.

In order to run the tests you have to set up the test database so that Shopware runs them with our plugin enabled.

After the plugin is installed in your shop, make sure you execute the follwing command (in the Shopware root directory) to dump the current configuration of your shop to the test-database (when using Docker, run it inside the container):

$ ./psh.phar init-test-databases

Then execute the following commands in the plugin's root directory to run the test.

$ composer dump-autoload
$ ../../../vendor/bin/phpunit

Licensing

The code in this project is licensed under the MIT license.

About the Author

This plugin has been created by Divante eCommerce Software House.

Divante Logo

We are a leading, global eCommerce solution partner, headquartered in Poland with more than 250 people on board. Our essential business Partners are Magento, SAP, Shopware, Pimcore, commercetools, Vue.js, Symfony, to list just a few. We believe in Open Source. That's why we build vibrant communities of employees, contributors, clients, advisors as an ecosystem around exceptional products and services.

It enables us to deliver the expected effects of projects quickly and in an agile way, making it easier for clients to gain a competitive advantage. Our clients are present and future leaders of their industries, perceiving technology as a key ingredient to the success of their company.

For more information, please visit Divante.com.