polosat Posted February 17, 2023 Share Posted February 17, 2023 (edited) Hello everyone. Here is my simple module for displaying countdown timers on products. You can show timers automatically on all products with time-limited discounts. Or add them manually to specific products. The module supports themes, 2 included. Timers can be displayed in the product list and on the product page. In the settings you can choose positions for displaying timers or use a custom hook. Works with PrestaShop 1.5, 1.6, 1.7, 8. Translations: EN, FR, ES, IT, DE, PL, PT, NL, CA, SK, RU Timers in the product list: On the product page: Product page in the back office: The timer list: Settings: psproductcountdown.zip Edited July 18 by polosat (see edit history) Link to comment Share on other sites More sharing options...
riga75 Posted June 5 Share Posted June 5 Hello I am upgrading the site to prestashop 8 and php 8.1 and I get this error message from the logs concerning your module: AH01215: PHP Deprecated: The hook "Header" is deprecated, please use "displayHeader" instead in module "psproductcountdown". in /var/www/vhosts/MYSITE.com/classes/Hook.php on line 921: /var/www/cgi-bin/cgi_wrapper/cgi_wrapper what can I do? thank you Link to comment Share on other sites More sharing options...
polosat Posted June 5 Author Share Posted June 5 12 hours ago, riga75 said: Hello I am upgrading the site to prestashop 8 and php 8.1 and I get this error message from the logs concerning your module: AH01215: PHP Deprecated: The hook "Header" is deprecated, please use "displayHeader" instead in module "psproductcountdown". in /var/www/vhosts/MYSITE.com/classes/Hook.php on line 921: /var/www/cgi-bin/cgi_wrapper/cgi_wrapper what can I do? thank you Hello, Indeed, you're right, it should be updated. I'm attaching the updated module. Please try it, it should help. psproductcountdown.zip 1 Link to comment Share on other sites More sharing options...
riga75 Posted June 6 Share Posted June 6 It seems that the error no longer occurs. The problem now is that if I go into the module configuration and click on the various tabs, nothing happens, the tabs don't open Link to comment Share on other sites More sharing options...
polosat Posted June 6 Author Share Posted June 6 8 hours ago, riga75 said: It seems that the error no longer occurs. The problem now is that if I go into the module configuration and click on the various tabs, nothing happens, the tabs don't open That's strange, there were no changes related to this. Please try to clear your browser cache (Ctrl + F5) and PrestaShop cache first. If it doesn't help, could you show me a screenshot of your browser console? There should be some error. Usually you can open it by pressing Ctrl + Shift + J. Link to comment Share on other sites More sharing options...
riga75 Posted June 6 Share Posted June 6 ok done Link to comment Share on other sites More sharing options...
polosat Posted June 6 Author Share Posted June 6 30 minutes ago, riga75 said: ok done It seems that one of the module hooks is missing. Try to uninstall and install the module again, it'll restore its hooks. Link to comment Share on other sites More sharing options...
riga75 Posted June 6 Share Posted June 6 ok now works, thanks a lot Link to comment Share on other sites More sharing options...
O Gato Hobby Posted July 15 Share Posted July 15 Hi, Nice work! Is it possible to add the "date from" somewhere? Here, by law, all discounted products must show the beginning and end. Link to comment Share on other sites More sharing options...
polosat Posted July 15 Author Share Posted July 15 6 hours ago, O Gato Hobby said: Hi, Nice work! Is it possible to add the "date from" somewhere? Here, by law, all discounted products must show the beginning and end. Hi, Do you mean adding a text with dates near the timer? Unfortunately there is no such option at the moment. Could you show me an example of how it should look? Maybe I can add it. Link to comment Share on other sites More sharing options...
O Gato Hobby Posted July 16 Share Posted July 16 11 hours ago, polosat said: Hi, Do you mean adding a text with dates near the timer? Unfortunately there is no such option at the moment. Could you show me an example of how it should look? Maybe I can add it. Hi, Start date must be shown. I've sent an image to show what it is. Thanks Link to comment Share on other sites More sharing options...
polosat Posted July 17 Author Share Posted July 17 I updated the module and added an option "Show the start date". Now it can show the start date above the timer. psproductcountdown.zip Link to comment Share on other sites More sharing options...
O Gato Hobby Posted July 17 Share Posted July 17 3 hours ago, polosat said: I updated the module and added an option "Show the start date". Now it can show the start date above the timer. psproductcountdown.zip 446.91 kB · 1 download Thanks. I'll try. Link to comment Share on other sites More sharing options...
Subhahan Posted July 18 Share Posted July 18 works fine. Thank for your effort Link to comment Share on other sites More sharing options...
O Gato Hobby Posted July 18 Share Posted July 18 Works well. Thanks Just one thing to fix. On logs it is writing almost every minute: PHP Deprecated: The hook "displayProductButtons" is deprecated, please use "displayProductAdditionalInfo" instead in module "psproductcountdown". in .../public_html/classes/Hook.php on line 875 (Prestashop version: 8.1.1) Link to comment Share on other sites More sharing options...
polosat Posted July 18 Author Share Posted July 18 8 hours ago, O Gato Hobby said: Works well. Thanks Just one thing to fix. On logs it is writing almost every minute: PHP Deprecated: The hook "displayProductButtons" is deprecated, please use "displayProductAdditionalInfo" instead in module "psproductcountdown". in .../public_html/classes/Hook.php on line 875 (Prestashop version: 8.1.1) You're right, thanks for the feedback. I updated the module, now it won't use this hook in modern PrestaShop versions. You might need to manually unhook it from the hook "displayProductButtons" after upgrading. psproductcountdown.zip Link to comment Share on other sites More sharing options...
O Gato Hobby Posted July 19 Share Posted July 19 (edited) 22 hours ago, polosat said: You're right, thanks for the feedback. I updated the module, now it won't use this hook in modern PrestaShop versions. You might need to manually unhook it from the hook "displayProductButtons" after upgrading. psproductcountdown.zip 447.74 kB · 3 downloads Looks awesome now! Nice work. To be perfect, I just would add a field to put the discount on the product directly from the module. Something like in the picture. Edited July 19 by O Gato Hobby Forgot the pic (see edit history) Link to comment Share on other sites More sharing options...
polosat Posted July 20 Author Share Posted July 20 15 hours ago, O Gato Hobby said: Looks awesome now! Nice work. To be perfect, I just would add a field to put the discount on the product directly from the module. Something like in the picture. Thanks for the suggestion Sure, it will be a nice feature and I guess I'll really add it. Unfortunately I can't at the moment, hopefully I'll get a chance later. 2 Link to comment Share on other sites More sharing options...
SMA17 Posted July 25 Share Posted July 25 Hello Why i not get hours on the timer? Link to comment Share on other sites More sharing options...
polosat Posted July 25 Author Share Posted July 25 4 hours ago, SMA17 said: Hello Why i not get hours on the timer? Hello, Do you mean that the hours value is always "00" and it's not updated? I have never seen such a problem before, could you send me a link to a page with such issue? Link to comment Share on other sites More sharing options...
SMA17 Posted July 26 Share Posted July 26 Now its working Link to comment Share on other sites More sharing options...
Interlumen Posted August 21 Share Posted August 21 The module hides photos Link to comment Share on other sites More sharing options...
polosat Posted August 21 Author Share Posted August 21 4 hours ago, Interlumen said: The module hides photos Hello, Try to change the position of the timer ("Position in product list" option). Probably there is some conflict with the product list structure. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now