AffordableDomainsCanada Posted December 6, 2015 Share Posted December 6, 2015 http://www.whmcs.com/support/ I want to use the Open/Closed feature kinda what is used on the link above. Here is mysite link http://www.affordabledomains.ca/support.php here is the code I have so far; <div style="padding:15px 0;background-color:#eee;"><div class="container"> <div class="support-hours"> <div class="col-sm-3"> <h4><a href="http://www.affordabledomains.ca/submitticket.php?step=2&deptid=4" style="display:block;color:#222;">Customer Service</a></h4> <div>8am to 8pm EST<br/>(Monday – Sunday)</div> <span class="badge-closed"><i class="fa fa-times-circle"></i> Closed</span> </div> <div class="col-sm-3"> <h4><a href="http://www.affordabledomains.ca/submitticket.php?step=2&deptid=5" style="display:block;color:#222;">Billing Department</a></h4> <div>8am to 8pm EST<br/>(Monday – Sunday)</div> <span class="badge-closed"><i class="fa fa-times-circle"></i> Closed</span> </div> <div class="col-sm-3"> <h4><a href="http://www.affordabledomains.ca/submitticket.php?step=2&deptid=1" style="display:block;color:#222;">Sales Department</a></h4> <div>8am to 8pm EST<br/>(Monday – Sunday)</div> <span class="badge-open"><i class="fa fa-check-circle"></i> Open</span> </div> <div class="col-sm-3"> <h4><a href="http://www.affordabledomains.ca/submitticket.php?step=2&deptid=2" style="display:block;color:#222;">Technical Support</a></h4> <div>24 Hours a Day<br/>(7 Days a Week)</div> <p class="badge-open"><i class="fa fa-check-circle"></i> Open </p> <p class="badge-open"> </p> </div> </div> <div class="clearfix"></div><br/> <p class="text-center text-muted"><i class="fa fa-clock-o"></i> Current Time: {'+1 hour'|strtotime|date_format:'%A, %B %d/%Y - %H:%M:%S EST'} </p> </div> </div> <br/><br/> I basically want it to show green and open during 8am-8pm, but red and showing closed outside those hours, and the tech. support to be open 24/7. so always open and green. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 6, 2015 Share Posted December 6, 2015 (edited) I basically want it to show green and open during 8am-8pm, but red and showing closed outside those hours, and the tech. support to be open 24/7. so always open and green. how about using the following for one of your depts... <h4><a href="http://www.affordabledomains.ca/submitticket.php?step=2&deptid=4" style="display:block;color:#222;">Customer Service</a></h4> <div>8am to 8pm EST<br/>(Monday – Sunday)</div>{if '+1 hour'|strtotime|date_format:'%H' gte 8 AND '+1 hour'|strtotime|date_format:'%H' lt 20}<span class="badge-open"><i class="fa fa-check-circle"></i> Open</span>{else}<span class="badge-closed"><i class="fa fa-times-circle"></i> Closed</span>{/if}</div> that should show "Open" between 8-8 and "Closed" during other times. Edited December 6, 2015 by brian! 0 Quote Link to comment Share on other sites More sharing options...
AffordableDomainsCanada Posted December 7, 2015 Author Share Posted December 7, 2015 how about using the following for one of your depts... <h4><a href="http://www.affordabledomains.ca/submitticket.php?step=2&deptid=4" style="display:block;color:#222;">Customer Service</a></h4> <div>8am to 8pm EST<br/>(Monday – Sunday)</div>{if '+1 hour'|strtotime|date_format:'%H' gte 8 AND '+1 hour'|strtotime|date_format:'%H' lt 20}<span class="badge-open"><i class="fa fa-check-circle"></i> Open</span>{else}<span class="badge-closed"><i class="fa fa-times-circle"></i> Closed</span>{/if}</div> that should show "Open" between 8-8 and "Closed" during other times. Working perfectly! 0 Quote Link to comment Share on other sites More sharing options...
AffordableDomainsCanada Posted December 7, 2015 Author Share Posted December 7, 2015 Here are the final results. Added some css style buttons to reflect the departments status. [ATTACH=CONFIG]9775[/ATTACH] 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 7, 2015 Share Posted December 7, 2015 it looks good. 0 Quote Link to comment Share on other sites More sharing options...
AffordableDomainsCanada Posted December 7, 2015 Author Share Posted December 7, 2015 Updated image of what I think is going to be the completion of this task. I have the live help tied into the chat system so it is update as chat operators come online, offline, etc.. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.