Start a conversation

Custom local banners

Add the below script to the begin (so important) of your Footer Script (Admin panel > Storefront > Footer Script)

<script>
    (function () {
        var $ = window.jQuerySupermarket;
        var $regions = $('[data-emthemesmodez-remote-banner]');

        $regions.each(function (id, region) {
            var $region = $(region);
            $region.after($('[data-emthemesmodez-local-banner="' + $region.data('emthemesmodezRemoteBanner') + '"]'));
        });
    })();
</script>


If you want to show a banner for a specific product, you need to adjust a little of the banner HTML that you get from the generator in our document.

Find in the outermost <tag>:

id="the banner id"

Replace with:

data-emthemesmodez-local-banner="the banner id"

Example

The HTML you get from our generator:

<div id="emthemesModezBannersBlockAfterRating" class="emthemesModezBannersBlockAfterRating">
    Banner HTML...
</div>

The adjusted HTML:

<div data-emthemesmodez-local-banner="emthemesModezBannersBlockAfterRating" class="emthemesModezBannersBlockAfterRating">
        Banner HTML...
</div>


Then copy and paste this HTML to the end of a product description HTML, see screenshot

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Papathemes

  2. Posted
  3. Updated

Comments