Enable add to cart buttons during active hours.
- 0.1.1
-
7.1
-
7.0
- Not Applicable
-
Squarespace plan that supports JavaScript.
-
Install twcsl. After you install twcsl be sure to continue on with the rest of the steps.
-
Add code from file add to cart button active hours.html to Website > Pages > Website Tools > Code Injection > FOOTER. Please see Add code to code injection. Read the code for any instructions within.
By default the code uses Settings > Business Information > BUSINESS HOURS to determine when the atc button is active. You can override the business hours set in your site using settings in the code. Use the same hours format as shown in the support documentation < https://tinyurl.com/ybunsvxz > or the user interface.
The button is inactive effect is minimal. You can of course use your own custom CSS to enhance or replace what the code does. A twc-atcbah class is added to the atc wrapper element.
If you need installation help or customization please contact me for paid consulting.
Please consider making a donation.
-
2023-07-19
- fix a bug in textToRanges returning bad ranges
- bumped version to 0.1.1
-
2023-07-19
- initial version