peterbrain / magento2-modal-overlay
Display custom content from a static block in a modal
Installs: 34
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:magento2-module
Requires
README
Magento 2 Module - ModalOverlay
Package name: peterbrain/magento2-modal-overlay
Main Functionalities
- Display custom content from a static block in a modal.
- Show modal after a configurable amount of visited pages.
Installation
Method 1: Composer (recommended)
composer require peterbrain/magento2-modal-overlay
Method 2: Zip file (not recommended)
- Unzip the zip file in
app/code/PeterBrain
This extension is dependent on PeterBrain Core. Make sure that you have installed it first.
Enable & deploy
php bin/magento module:enable PeterBrain_ModalOverlay php bin/magento setup:upgrade php bin/magento cache:flush
Usage
- Enable module ouptut in
Stores > Configuration > PeterBrain Extensions > Modal Overlay > General Configuration
- In Magento 2 admin, navigate to
Content > Blocks
and create a new static block with the identifiermodal-overlay_popup
. - If the module is enabled, the static block exists and is enabled, the modal pops up:
- when a user vistits at least three pages
- once per user (stored in local storage - cookieless!)
In-depth information
The visited pages (count) and status of modal are stored in local storage as follows:
mage-cache-storage
: {"modal-overlay":{"displayed":false,"visited_pages":2}}