Getting Started

Welcome to the Promo Banners documentation. Whether you are a new or an advanced user, you can find some useful information here.

First of all, we recommend to check the following link:

  • How to install extension

Second of all, proceed then with Quick Start, which will guide you through creating your own Promo Banners.

How to install the extension

  1. Backup your store's database and web directory.
  2. Login to the SSH console of your server and navigate to the root directory of the Magento 2 store.
  3. Copy the installation instructions from the page My Downloadable Products to the SSH console and press ENTER.
  4. Run command php -f bin/magento module:enable Mirasvit_Core Mirasvit_Banner to enable the extension.
  5. Run command php -f bin/magento setup:upgrade to install the extension.
  6. Run command php -f bin/magento cache:clean to clean the cache.
  7. Deploy static view files

    rm -rf pub/static/*; rm -rf var/view_preprocessed/*; php -f bin/magento setup:static-content:deploy

Install the extension for Hyva

  1. Run the command

        composer require hyva-themes/magento2-mirasvit-banner
  2. Enable installed Hyva modules:

        bin/magento module:enable Hyva_MirasvitBanner 
  3. Update Magento database schema and data with the command:

        bin/magento setup:upgrade
  4. Compile the code of the installed extension:

        bin/magento setup:di:compile
  5. Run the command below to clean the cache:
        bin/magento cache:flush

Quick Start

Banner ads encourage you to buy certain products.

And here, it's all about a proper context and placement. To be appropriate and effective, with our Promo Banners for Magento 2, the banner's ad placed on a website has got to be associated with that niche and provide the answer to the visitor query that ended up on that website.

It's important that the banner content area of your website is utilized to the best of its ability, and here are a few steps that should be tuned-up:

  1. Place different types of Banners (images, text, combined) on any page.
  2. Specify position by creating a Placeholders. Additionally, you can specify criteria (target group) for displaying.
  3. Track a Banners Analytics.

This should be a good start. Refer to corresponding sections of this manual to know more.

Banners

You can easily create a positive impression on your customers, direct them to your most compelling offer, etc. what will benefit your income by implementing is an onsite Promo Banner campaign.

Follow to Marketing > Promo Banners > Banners to manage or create new banners.

Banners grid allows managing by ID, Name, Status, Position, Action, and Analytics.

Let's start from Add New Banner:

General Information

  • Active - Turn-on / off the banner.
  • Internal Name - Internal banner name.
  • Active From - Starting date of the banner's displaying.
  • Active To - Ending date of the banner's displaying.
  • Store Views - Sets which store views (stores) to display a banner.
  • Customer Groups - Sets which groups of customers to display a banner (NOT LOGGED IN, General, Retailer, Wholesale).
  • Placeholder - Places on the page where to display the banner on the site. You can add your own Placeholdes.
  • Priority - Priority of each banner.

Conditions

At the Conditions tab, you will see a conditional block, which allows you to filter attributes, to which Promo Banners should be applied.

Attributes can be different for each store - depends on whether the attribute participates Cart Attributes or Product Attribute or Page Attributes. It has a number of options apart from Magento's default options (leave the conditions blank if you want to apply for all products).

Content

  • URL - adds the link where visitors will be redirected by clicking on the banner.

Edit banner's text or image content with a default Magento Using the Editor.

Analytics

Our special tool to track Impressions and Clicks per banners. Analytics count in real-time, no need to set up cron for this. If some unique visitor sees your banner +1 Impression, he clicks on it and follows the link you added + 1 Click. As a result, you get the percentage value per each banner.

Extremely useful to know what's interesting for your store visitors and customers.

Placeholders

Placeholder - is a place on a page of the web site where a banner can be displayed. The same placeholder can be used for more than one banner.

Follow to Marketing > Promo Banners > Placeholders to manage or create new placeholders.

To set up a new placeholder, you need to click the button Add New Placeholder:

General Information

  • Active - Turn-on / off the placeholder. If the placeholder is active, it will be displayed in Banner placeholder's settings.
  • Internal Name - Internal placeholder name.
  • Display Mode - Display formats:
    • Rotator - Randomly rotates the banner ads that are seen by users, so that each time the site is visited or refreshed a different banner ad will appear;
    • Pop Up - Displays on top of site content after page loading. By clicking the Close button, the banner is completely closed. Has additional setting:
      • Popup position - determines where the banner should appear. Has 4 option: Bottom Right, Bottom Left, Top Right, Top Left. The default position is Bottom Right
      • Delay (seconds) - the delay in seconds after which the banner should appear. If empty - the delay will be 3 seconds.
      • Re-appear in (hours) - determines the appearance of the banner on page reload. Any positive number will make banner re-appear after thet amount of hours after the first appearance. Set 0 to display banner on every reload of the page. Set -1 to display banner only once. If empty - the default value of 24 hours will be used.
    • Lightbox Pop Up - Similar to the Pop-up but displayed over the whole page. Has additional setting:
      • Delay (seconds) - the delay in seconds after which the banner should appear. If empty - the delay will be 3 seconds.
      • Re-appear in (hours) - determines the appearance of the banner on page reload. Any positive number will make banner re-appear after thet amount of hours after the first appearance. Set 0 to display banner on every reload of the page. Set -1 to display banner only once. If empty - the default value of 24 hours will be used.
      • Close button - set the custom close button text. If empty - the default button will be used.
      • Mask Color - choose the color of the mask for banner. If empty - the default masc will be used, which is rgba(0, 0, 0, .7);
    • Slider - Displays multiple banners in one placeholder. This type of placeholder supports swiping. Has Additional settings:
      • Autoplay - enable/disable automatic banners swiping.
      • Autoplay timeout (seconds) - the delay in seconds between changing slides (banners).
      • Loop - enable/disable looping the slider (display first slide after the last one).
      • Show Prev/Next Buttons - enable/disable navigation buttons.
      • Prev Button,Next Button - set custom navigation buttons. If any of Prev or Next button or both are empty the default buttons will be used.
      • Show paging buttons - enable/disable paging buttons

        Note

        All additional setting will have effect only if 2 or more banners are present in the Slider placeholder.

Position

There are two formats Use predefined position set Yes or No.

If set No, there is available only:

  • Position with Syntax: layout/container/before/after
    Example: catalog_product_view/product.info.extrahint//-

If set Yes, the following settings are available:

  • Display on - defines a page where banners will be displayed, for example, All pages, Shopping Cart, Product page, and others.
  • Container - specifies a particular place on page to dispay banner, use a debug mode to simplify positioning.
  • Before - special field, which helps to place the placeholder before all other elements in the container, use "-" to implement it.

Display Conditions

At the Conditions tab, you will see a conditional block, which allows you to set attributes, to which Promo Banners should be applied.

Attributes can be different for each store - depends on whether the attribute participates Cart Attributes or Product Attribute or Page Attributes. It has a number of options apart from Magento's default options (leave the conditions blank if you want to apply for all products).

Use Action name, if you want to display banners on CMS pages, Category or Product, Checkout Cart pages. Use URI if you want to display banners on the particular pages, for example, Sale, Blog, or Landing pages.

Command Line Interface

Usage: php -f bin/magento [options]

  • mirasvit:banner:layout [options] - Handle layout updates related to banners
    • --cleanup - Cleanup layout updates - use the command with this option before disabling the extension to prevent errors on frontend pages
    • --restore - Restore Layout updates - use the command with this option after enabling the extension to restore layout updates related to banners' placeholders

How to upgrade extension

To upgrade the extension follow these steps:

  1. Backup your store's database and web directory.
  2. Login to the SSH console of your server and navigate to the root directory of the Magento 2 store.
  3. Run command composer require mirasvit/module-banner:* --update-with-dependencies to update current extension with all dependencies.

    Note

    In some cases the command above is not applicable, it's not possible to update just current module, or you just need to upgrade all Mirasvit modules in a bundle. In this case command above will have no effect.

    Run instead composer update mirasvit/* command. It will update all Mirasvit modules, installed on your store.

    Note

    If you have the Hyva installed, run:

    composer require mirasvit/module-banner:* hyva-themes/magento2-mirasvit-banner:* --update-with-dependencies

  4. Run command php -f bin/magento setup:upgrade to install updates.
  5. Run command php -f bin/magento cache:clean to clean the cache.
  6. Deploy static view files

    rm -rf pub/static/*; rm -rf var/view_preprocessed/*; php -f bin/magento setup:static-content:deploy

Disabling the Extension

Temporarily Disable

To temporarily disable the extension please follow these steps:

  1. Login to the SSH console of your server and navigate to the root directory of the Magento 2 store.
  2. Run command php -f bin/magento mirasvit:banner:layout --cleanup to disable the extension.
  3. Run command php -f bin/magento module:disable Mirasvit_Banner to disable the extension.

    Note

    If you have Hyva installed, run:

    php -f bin/magento module:disable Mirasvit_Banner Hyva_MirasvitBanner

  4. Log in to the Magento backend and refresh the store cache (if enabled).

Removing the Extension

To uninstall the extension, please follow these steps:

  1. Login to the SSH console of your server and navigate to the root directory of the Magento 2 store.
  2. Run the command composer remove mirasvit/module-banner to remove the extension.

    Note

    If you have the Hyva installed, run:

    composer remove mirasvit/module-banner hyva-themes/magento2-mirasvit-banner

  3. Log in to the Magento backend and refresh the store cache (if enabled).

Change Log

1.1.23

(2024-10-02)

Improvements

  • Ability to set time for banners' Active From and Active To fields

1.1.22

(2024-10-01)

Improvements

  • Store View column in Banners grid
  • Relative banner URL's behavior improved

1.1.21

(2024-07-31)

Improvements

  • Status and Display Mode columns added to the placeholders grid

1.1.20

(2024-07-22)

Fixed

  • Fixed the issue with custom placeholder's CSS (CSP)

1.1.19

(2024-07-11)

Fixed

  • Fixed the issue with the debug mode

1.1.18

(2024-06-25)

Fixed

  • Fixed the issue with the error on the Placeholder edit page (Call to a member function getArea() on null)

1.1.17

(2024-06-05)

Fixed

  • Fixed the issue with empty Containers list in the Placeholder form (in some stores theme with ID 1 is the admin area theme)

1.1.16

(2024-05-15)

Fixed

  • Fixed the issue with category chooser (product's attribute) in banner rules

1.1.15

(2024-05-10)

Improvements

  • Compatibility with Mirasvit_Gdpr 1.4.*

1.1.14

(2024-04-19)

Fixed

  • Fixed the compatibility issue with PHP7 (since 1.1.13)

1.1.13

(2024-04-15)

Improvements

  • Ability to disable collecting banners' impressions and clicks

1.1.12

(2024-03-07)

Improvements

  • Console command to cleanup/restore layout updates for banners' placeholders

Fixed

  • Fixed the issue with category rule in banner conditions

1.1.11

(2023-12-05)

Improvements

  • Active From and Active To columns in Banners grid

1.1.10

(2023-10-12)

Fixed

  • Fixed the issue with Re-appear in (hours) = 0

1.1.9

(2023-09-12)

Fixed

  • Magento EE compatibility

1.1.8

(2023-05-11)

Fixed

  • TypeError: Unsupported operand types: string int (PHP8.)
  • Issue with unexpected banners behavior when banners have their own display conditions

1.1.7

(2023-05-05)

Features

  • Lightbox Popup banner
  • Slider banner

Improvements

  • Additional settings for banners

1.1.6

(2023-02-17)

  • Issue with FilterInput for Magento 2.4.5

1.1.5

(2023-02-09)

Improvements

  • Added support of Magento 2.4.6

Fixed

  • Fixed the issue with loader request (Hyva)

1.1.4

(2022-09-07)

Fixed

  • Fixed the issue with jquery/jquery.cookie (Magento 2.4.5)
  • PHP8.1 compatibility

1.1.3

(2022-08-09)

Fixed

  • PHP8.1 compatibility

1.1.2

(2022-08-09)

Fixed

  • fixed an issue with saving banners

1.1.1

(2022-06-20)

Improvements

  • remove db_schema_whitelist.json

1.1.0

(2022-05-23)

Improvements

  • migrate to declarative schema

1.0.11

(2021-04-19)

Fixed

  • Fix delete message for m2.4

1.0.10

(2021-02-04)

Improvements

  • Custom placeholders

Fixed

  • fixed an issue with incorrect display of the 'freeShippingLeft' attribute value on sites with multiple stores

1.0.9

(2020-11-27)

Improvements

  • Custom placeholders

1.0.8

(2020-11-23)

Fixed

  • Fixed issue with the page builder in Magento Enterprise Edition

1.0.7

(2020-10-29)

Improvements

  • added compatibility with the php 7.4

1.0.6

(2020-09-11)

Improvements

  • Small spelling fixes

1.0.5

(2020-07-29)

Improvements

  • Support of Magento 2.4

1.0.4

(2020-07-14)

Improvements

  • Support of GraphQL API

Fixed

  • Issue with placeholder rules validation

1.0.3

(2020-05-12)

Improvements

  • Backend Interface

Fixed

  • Issue with layouts

1.0.2

(2020-04-21)

Improvements

  • Extended display rules: Product Rules and Category Rules

1.0.1

(2020-04-15)

Features

  • Free shipping variables for banners

1.0.0

(2020-03-25)

Features

  • Initial release