shopify-countdown-cart
docs for countdown cart for shopify​
It was quite a big task and it was divided to many MRs. They are: https://gitlab.com/powr/powr/-/merge_requests/7004 https://gitlab.com/powr/powr/-/merge_requests/7090 https://gitlab.com/powr/powr/-/merge_requests/7022 https://gitlab.com/powr/powr/-/merge_requests/6919 https://gitlab.com/powr/powr/-/merge_requests/6822 https://gitlab.com/powr/powr/-/merge_requests/6848 https://gitlab.com/powr/powr/-/merge_requests/6819 https://gitlab.com/powr/powr/-/merge_requests/6793 https://gitlab.com/powr/powr/-/merge_requests/6805
https://www.figma.com/file/TbbwvMfodq0GGctJ6c18Gy/Countdown-Timer-Overhaul?node-id=1038%3A0
Countdown cart feature of countdown timer which is visible only for Shopify. To see it you need to create app from shopify itself. Main purpose of countdown cart feature is to start timer and countdown before user ends their purchase. After timer finishes it will remove every item in the cart or something else(depends on settings).
All changes basically placed in countdownTimer files. But powr_local.js also was used to interact with Shopify cart page, check if there are some items in the cart or send request to clear cart. Note: to see that cart is cleared page need to be reloaded.
To clear the cart and show the timer when there is any item in the cart(don't show it when cart is empty) I used next code in powr_local.js:
Other features are pretty simple and uses countdownTimer.js, _countdownTimerSettings.html.haml,
_countdownTi‎mer.css.scss, _countdownTi‎mer.html.erb files. This app isn't reactified yet.