Jump to content
sachinyadav82

[FREE MODULE] Announcement and Notification Bar Module

Recommended Posts

Hello Everyone,

I have created my first module Announcement and Notification Bar Module.

This Announcement and Notification bar module adds an attracting bar to the top of your website to highlight some specific news you want to convey to your users. You can even add some links as well as set the no. of days to sow this bar.

It even displays a countdown along with text and link.  I will try to add more features later. Below is some screenshot of the module.

 

 

What does it do?

  • Display a announcement banner at the top of PrestaShop
  • You can change text, coupon Code, and days to show etc.
  • You can also change the design like background and color of text etc.

I hope you will find this module useful. Any comments, ideas and requests are more than welcome!

Version History:

1.0.0 - Initial release

1.0.1 - Multilingual Added

 

Here is the module: ppannouncements.zip

 

945219532_Screenshot_2019-10-01PrestaShopPlugins.thumb.png.5b26bce3fa2cd104583fa77fec153609.png

1239683125_Screenshot_2019-10-01ModuleManagerPrestaShopPlugins(1).thumb.png.5394b205d6cd48a810fc7220a336ae07.png

383298389_Screenshot_2019-10-01ModuleManagerPrestaShopPlugins.thumb.png.896a10ebaf19c1dbb4b3b4d8f202c9f2.png

 

 

Edited by sachinyadav82
Tags Added (see edit history)
  • Thanks 2

Share this post


Link to post
Share on other sites

Hello!

The idea is great as simple is it! Thanks for the module...

Unfortunately something with the css because broke the site... please see attached image!

hhh.jpg

Share this post


Link to post
Share on other sites

I have installed but nothng show in public page.
Is there some coding to be done so that is shows above top banner ?

 

Share this post


Link to post
Share on other sites
2 minutes ago, Yankee Store said:

I have installed but nothng show in public page.
Is there some coding to be done so that is shows above top banner ?

 

You need to  set the announcement module settings form the admin back office. Just go to Modules->Modules Catalog. Search for Announcement Module. Click on configure and  set the settings like enable add announcement etc like show below 

             306021623_Screenshot_2019-10-01ModuleManagerPrestaShopPlugins(1).png.5d459779830c272c680a308a50518021.thumb.png.f67087c36d94da3bf435588ff4398b63.png

 

 

Share this post


Link to post
Share on other sites

Thank You for you quick response


I had done that ...  but had not change the dates format.   xxxx /xx  / xx  which changes automatically to  xxxxx-xx- xx     
until you do that   it does not show....

Thank you  . great module to have 

 

Share this post


Link to post
Share on other sites
13 minutes ago, Yankee Store said:

Thank You for you quick response


I had done that ...  but had not change the dates format.   xxxx /xx  / xx  which changes automatically to  xxxxx-xx- xx     
until you do that   it does not show....

Thank you  . great module to have 

 

Great to see, This module helped you.  

Share this post


Link to post
Share on other sites
3 minutes ago, Yankee Store said:

Is there a way for multiple languages ??  

 

I have not yet added for multiple language support. I will add it and will update the plugin tomorrow.

Share this post


Link to post
Share on other sites
On 10/1/2019 at 3:36 PM, sachinyadav82 said:

Hello Everyone,

I have created my first module Announcement and Notification Bar Module.

This Announcement and Notification bar module adds an attracting bar to the top of your website to highlight some specific news you want to convey to your users. You can even add some links as well as set the no. of days to sow this bar.

It even displays a countdown along with text and link.  I will try to add more features later. Below is some screenshot of the module.

 

 

What does it do?

  • Display a announcement banner at the top of PrestaShop
  • You can change text, coupon Code, and days to show etc.
  • You can also change the design like background and color of text etc.

I hope you will find this module useful. Any comments, ideas and requests are more than welcome!

 

Here is the module: ppannouncements.zip

 

945219532_Screenshot_2019-10-01PrestaShopPlugins.thumb.png.5b26bce3fa2cd104583fa77fec153609.png

1239683125_Screenshot_2019-10-01ModuleManagerPrestaShopPlugins(1).thumb.png.5394b205d6cd48a810fc7220a336ae07.png

383298389_Screenshot_2019-10-01ModuleManagerPrestaShopPlugins.thumb.png.896a10ebaf19c1dbb4b3b4d8f202c9f2.png

 

 

 

Hello, thanks for this simple sharing is fine. Please possible add option time cookie ?

Edited by TCHOUPI (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites
On 11/14/2019 at 6:50 PM, sachinyadav82 said:

I have not yet added for multiple language support. I will add it and will update the plugin tomorrow.

Hi,

Good module to promote sales during Black Friday and Cyber Monday. I will wait for the new version with multiple language support. 

Great work..

Share this post


Link to post
Share on other sites

Hello All,

 

Updated this module with multilingual support. Thanks for all your support. Do tell me more about how to improve this module further.

 

Version History:

 

1.0.0  -  Initial Release

1.0.1 - Multilingual Support Added.

 

Here is the latest file.

 

ppannouncements.zip

 

I hope you will find this module useful. Any comments, ideas and requests are more than welcome!

Share this post


Link to post
Share on other sites

Great module to have!

It worked fine after setup the announcement, but when I closed the configuration page and open it again, the settings saved all gone. It still runs in the front, but just the configuration page went back to default blank. I use PS 1.7.3.4 classic theme.

Any help on it? Thanks

Share this post


Link to post
Share on other sites
On 10/1/2019 at 3:36 PM, sachinyadav82 said:

Hello Everyone,

I have created my first module Announcement and Notification Bar Module.

This Announcement and Notification bar module adds an attracting bar to the top of your website to highlight some specific news you want to convey to your users. You can even add some links as well as set the no. of days to sow this bar.

It even displays a countdown along with text and link.  I will try to add more features later. Below is some screenshot of the module.

 

 

What does it do?

  • Display a announcement banner at the top of PrestaShop
  • You can change text, coupon Code, and days to show etc.
  • You can also change the design like background and color of text etc.

I hope you will find this module useful. Any comments, ideas and requests are more than welcome!

 

Here is the module: ppannouncements.zip

 

945219532_Screenshot_2019-10-01PrestaShopPlugins.thumb.png.5b26bce3fa2cd104583fa77fec153609.png

1239683125_Screenshot_2019-10-01ModuleManagerPrestaShopPlugins(1).thumb.png.5394b205d6cd48a810fc7220a336ae07.png

383298389_Screenshot_2019-10-01ModuleManagerPrestaShopPlugins.thumb.png.896a10ebaf19c1dbb4b3b4d8f202c9f2.png

 

 

 

Hello, thanks for this simple sharing is fine

 

 

Edited by TCHOUPI (see edit history)

Share this post


Link to post
Share on other sites
12 hours ago, CharlenePro said:

Great module to have!

It worked fine after setup the announcement, but when I closed the configuration page and open it again, the settings saved all gone. It still runs in the front, but just the configuration page went back to default blank. I use PS 1.7.3.4 classic theme.

Any help on it? Thanks

 

hi yes me too, saved settings will be disabled after refreshing the page

Edited by TCHOUPI (see edit history)

Share this post


Link to post
Share on other sites
29 minutes ago, TCHOUPI said:

Hello, Thanks you for sharing, I have a conflict with a hook, how to put this hook hookdisplayTop1 on your php

Hello TCHOUPI,

To hook the module in hookdisplayTop1, You need to simply change two lines of code in module main file - ppannouncements.php

 

1. Change the Install function from 

 public function install()
    {

        $languages = Language::getLanguages(false);
        return parent::install() &&
            $this->registerHook('header') &&
            $this->registerHook('displayHeader');
    }

to 

 

 public function install()
    {

        $languages = Language::getLanguages(false);
        return parent::install() &&
            $this->registerHook('header') &&
            $this->registerHook('displayHeader') &&
            $this->registerHook('displayTop1');
    }

 

 

2.  Add a new function  at the end 

public function hookDisplayTop1($params) {
	return $this->display(__FILE__, '/views/templates/hook/ppannouncment-front.tpl');
}

 

Also don't forget to delete or comment return $this->display(__FILE__, '/views/templates/hook/ppannouncment-front.tpl');  from the function  public function hookDisplayHeader($params). Otherwise you will have 2 announcement bar at the top.

 

After doing these changes Reset the module and your work will be done.  Hope this will work. As far as other problem of the module. I am working on that.

  • Like 1

Share this post


Link to post
Share on other sites
52 minutes ago, sachinyadav82 said:

Hello TCHOUPI,

To hook the module in hookdisplayTop1, You need to simply change two lines of code in module main file - ppannouncements.php

 

1. Change the Install function from 


 public function install()
    {

        $languages = Language::getLanguages(false);
        return parent::install() &&
            $this->registerHook('header') &&
            $this->registerHook('displayHeader');
    }

to 

 


 public function install()
    {

        $languages = Language::getLanguages(false);
        return parent::install() &&
            $this->registerHook('header') &&
            $this->registerHook('displayHeader') &&
            $this->registerHook('displayTop1');
    }

 

 

2.  Add a new function  at the end 


public function hookDisplayTop1($params) {
	return $this->display(__FILE__, '/views/templates/hook/ppannouncment-front.tpl');
}

 

Also don't forget to delete or comment return $this->display(__FILE__, '/views/templates/hook/ppannouncment-front.tpl');  from the function  public function hookDisplayHeader($params). Otherwise you will have 2 announcement bar at the top.

 

After doing these changes Reset the module and your work will be done.  Hope this will work. As far as other problem of the module. I am working on that.

 

 

Hi Thanks you it works

Share this post


Link to post
Share on other sites

Thanks for the module @sachinyadav82 👏👏👏

I think what @TCHOUPI said about the option to set a cookie time would be a good improvement.
Otherwise when you close the advert and navigate to another page the advert pop up again :)

Share this post


Link to post
Share on other sites

Someone can help me please? I already installed the module i paste the codes to the two lines of code in module main file - ppannouncements.php, but still not working. 

SOME HELP PLEASE

Share this post


Link to post
Share on other sites
9 hours ago, Orbitaga said:

Does this work on 1.6 ?

Yes this works both in 1.6 and 1.7

Share this post


Link to post
Share on other sites
1 hour ago, jcots87 said:

Someone can help me please? I already installed the module i paste the codes to the two lines of code in module main file - ppannouncements.php, but still not working. 

SOME HELP PLEASE

What problem you are facing.could you please tell me in details

Share this post


Link to post
Share on other sites

It doesn't appear nothing on the top. 

 

Share this post


Link to post
Share on other sites
Just now, jcots87 said:

It doesn't appear nothing on the top. 

 

did you configure the module. You need to enable the module from module settings page

Share this post


Link to post
Share on other sites

When I installed the module, I did it like any other module via the admin panel. Then I went to module manager and clicked configure on it and was done.

 

 

Share this post


Link to post
Share on other sites

@sachinyadav82 many thanks for your work on this module. 
Unfortunately it doesn't work for me neither and nothing show on the homepage. There's an error in the console (jQuery is not defined) which comes from the view template and the JS script at the end of it if it can help you. I tested on my PS 1.7.6.3 and also a fresh new install on 1.7.6.4

<script type="text/javascript">
        jQuery(document).ready(function() {
    var myDate = new Date();
    myDate.setDate(myDate.getDate() + 2);
    jQuery("#countdown").countdown(myDate, function (event) {
    jQuery(this).html(
    event.strftime(
    '<div class="timer-wrapper"><div class="time">%D</div><span class="text">days</span></div><div class="timer-wrapper"><div class="time">%H</div><span class="text">hrs</span></div><div class="timer-wrapper"><div class="time">%M</div><span class="text">mins</span></div><div class="timer-wrapper"><div class="time">%S</div><span class="text">sec</span></div>'
    )
    );
        });
});
</script>

Share this post


Link to post
Share on other sites

Hello again. I have 1.6.1.15 and when i try to install the module it says it is not compatible with my prestashop version.

Share this post


Link to post
Share on other sites
1 hour ago, Orbitaga said:

Hello again. I have 1.6.1.15 and when i try to install the module it says it is not compatible with my prestashop version.

Hi

Version 1.0.0 is ok for 1.6

Share this post


Link to post
Share on other sites

ehm, where can i find version 1.0.0  ? :s

Share this post


Link to post
Share on other sites

 Hi again

If anyone has any idea why this module says its incompatible with my 1.6.1.15 version of presta, or where can i find a previous version of this module i would appreciate it. I could really use this module.

Thanks !!

Share this post


Link to post
Share on other sites
1 hour ago, Orbitaga said:

 Hi again

If anyone has any idea why this module says its incompatible with my 1.6.1.15 version of presta, or where can i find a previous version of this module i would appreciate it. I could really use this module.

Thanks !!

Hello Orbitaga,

 

Here is version 1.0 that is compatible with PrestaShop 1.6

 

ppannouncements- ver1.0.0.zip

 

Hope it will solve your problem.

 

  • Thanks 1

Share this post


Link to post
Share on other sites
Posted (edited)

The module is working.

Values are save in database in configuration table correct. Also the announcement it shows correct in front.

The only problem i have is on the configuration page does not load the saved values. PS 1.7.5.1

image.thumb.png.19a1d1fca6ee778a60799e328471dde7.png

 

Edited by sanctusmob (see edit history)

Share this post


Link to post
Share on other sites
On 4/9/2020 at 3:07 PM, sachinyadav82 said:

Hello Everyone,

 

Here is version 1.0.2 working on PrestaShop version 1.7.6.4

ppannouncements1.0.2.zip 19.54 kB · 46 downloads

 

Sorry wrong attachment was uploaded. I have rectified it.

Hope t will help every one

Hello Sach,

Thank you very much for sharing this magnific module.

Only one question, it is possible to change the banner dimensions? Because I would like to use for text announment (for exemple, free delivery issue), i.e., to shorten the height of banner. Thank you.

Tom

Share this post


Link to post
Share on other sites

Thank You so much for great job. Works perfectly with some small cosmetics.

I have a question.

How can I turn on an option that module works only on main page?

Share this post


Link to post
Share on other sites
Posted (edited)
On 5/6/2020 at 11:16 AM, sanctusmob said:

The module is working.

Values are save in database in configuration table correct. Also the announcement it shows correct in front.

The only problem i have is on the configuration page does not load the saved values. PS 1.7.5.1

image.thumb.png.19a1d1fca6ee778a60799e328471dde7.png

 


Hi!

I have modified the file 'ppannouncements.php' to fix the problem. 😁

 

ppannouncements.php

Edited by JoseGV (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More