Open NaturePinks opened 4 years ago
Yes this is definitely related to AJAX. You can disable the AJAX add to cart in the WooCommerce settings.
Thanks jamesgol. It is catch 22, hard to not have ajax cart and hard to not have the cart stock reducer! I thinks this should be an enhancement if and when possible.
@jamesgol
I have made some changes to your plugin to a timer to the catalog/archive loop. It's not ajaxed based yet, but it does handle the output in a location where this is very useful for certain use cases.
It's not perfect yet, but perhaps you can polish it and add some options to the settings screen to control it seperate or nicer.
How can I contribute my changes to your plugin?
@jamesgol
After some more tweaking I got it to this (video recording): Two independant visitor sessions. The only part frustrating is that it only shows the timer after manual page refresh. Even if I disable AJAX, then I still need to manual refresh. Nevertheless, this is already a nice progress to get a timer output in the archive loop.
https://share.codeagency.be/s/LFoNoPqyERCHpqb
Ping me please so we can check how I can contribute this :)
You can create a pull request here on GitHub to submit your changes.
Unless the user refreshes the shop page, the countdown timer does not show. Cart stocks are removed at the end of the timer without prior notice. This may be to do with Ajax carts, it would be a good enhancement to show the timer at the first add to cart click.