I've tried searching but cannot find any post or addon to help with this query.
I want to create a simple countdown timer on my website. The countdown should be for 4PM (Monday to Friday), as this is when our delivery cut off point is. After 4PM, the countdown should start again until the next day. On Saturday and Sunday, it should count down until 4PM on Monday.
I did already look at that guide, but I can't seem to work out where I would put the javascript or JQuery in CS-Cart
You can put it in a scripts.post.tpl in my_changes. The path would be design/themes/responsive/templates/addons/hooks/index/scripts.post.tpl And the content would be something like:
// your JS goes here
Note Ecom's comments about using the literal tags. If an opening and closing squirley-braces are on the same line you should use literal tags. I.e.
myObj = {literal}{};{/literal}
// whereas this is okay
myObj = {
"property" : "value"
}
Note also that you can use template variable in JS by doing:
myVar = "{$tplData}";
// or
myVar = "{$product.amount}";