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.zipFetching info... Edited July 18, 2024 by polosat (see edit history) Link to comment Share on other sites More sharing options...
riga75 Posted June 5, 2024 Share Posted June 5, 2024 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, 2024 Author Share Posted June 5, 2024 On 6/5/2024 at 9:55 AM, 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 Expand Hello, Indeed, you're right, it should be updated. I'm attaching the updated module. Please try it, it should help. psproductcountdown.zipFetching info... 1 Link to comment Share on other sites More sharing options...
riga75 Posted June 6, 2024 Share Posted June 6, 2024 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, 2024 Author Share Posted June 6, 2024 On 6/6/2024 at 5:39 AM, 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 Expand 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, 2024 Share Posted June 6, 2024 ok done Link to comment Share on other sites More sharing options...
polosat Posted June 6, 2024 Author Share Posted June 6, 2024 On 6/6/2024 at 2:05 PM, riga75 said: ok done Expand 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, 2024 Share Posted June 6, 2024 ok now works, thanks a lot Link to comment Share on other sites More sharing options...
O Gato Hobby Posted July 15, 2024 Share Posted July 15, 2024 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, 2024 Author Share Posted July 15, 2024 On 7/15/2024 at 1:39 PM, 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. Expand 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, 2024 Share Posted July 16, 2024 On 7/15/2024 at 8:25 PM, 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. Expand 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, 2024 Author Share Posted July 17, 2024 I updated the module and added an option "Show the start date". Now it can show the start date above the timer. psproductcountdown.zipFetching info... Link to comment Share on other sites More sharing options...
O Gato Hobby Posted July 17, 2024 Share Posted July 17, 2024 On 7/17/2024 at 5:25 AM, 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 Expand Thanks. I'll try. Link to comment Share on other sites More sharing options...
Subhahan Posted July 18, 2024 Share Posted July 18, 2024 works fine. Thank for your effort Link to comment Share on other sites More sharing options...
O Gato Hobby Posted July 18, 2024 Share Posted July 18, 2024 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, 2024 Author Share Posted July 18, 2024 On 7/18/2024 at 10:02 AM, 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) Expand 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.zipFetching info... Link to comment Share on other sites More sharing options...
O Gato Hobby Posted July 19, 2024 Share Posted July 19, 2024 (edited) On 7/18/2024 at 7:17 PM, 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 Expand 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, 2024 by O Gato Hobby Forgot the pic (see edit history) Link to comment Share on other sites More sharing options...
polosat Posted July 20, 2024 Author Share Posted July 20, 2024 On 7/19/2024 at 5:58 PM, 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. Expand 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, 2024 Share Posted July 25, 2024 Hello Why i not get hours on the timer? Link to comment Share on other sites More sharing options...
polosat Posted July 25, 2024 Author Share Posted July 25, 2024 On 7/25/2024 at 9:13 AM, SMA17 said: Hello Why i not get hours on the timer? Expand 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, 2024 Share Posted July 26, 2024 Now its working Link to comment Share on other sites More sharing options...
Interlumen Posted August 21, 2024 Share Posted August 21, 2024 The module hides photos Link to comment Share on other sites More sharing options...
polosat Posted August 21, 2024 Author Share Posted August 21, 2024 On 8/21/2024 at 5:06 PM, Interlumen said: The module hides photos Expand 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