axelsky

axelsky supports this item

Supported

7 comments found.

this scripts is use server time or?

Yes, it uses the server time, but setting the right timezone would be enough to use the time you need

how can I use to zen cart?

Hi, I am not familiar with zen cart, but the script is very easy to integrate, so i think if you look at the demos, you will find a solution

can you put in openhours from 17:00 to 02:30 as 1 post or you have to put 17:00-24:00 and then another 00:00-02:30 ??

This is a good question… no, it is not possible to set in 1 line as the script expects the opening hours on the selected day, so the days cannot overlap.

Just wondering how we would set the timezone to Pacific Standard time.

Thanks!

you have to set this on the server, or somewhere in the script. You can try this:

date_default_timezone_set(‘America/Los_Angeles’);

somewhere before you call the script

Great system. Easy to use and modify. Have been using since release.

How do I get the button to override a schedule though? The button should override by default (In case they close or open early for any reason) but it doesn’t seem to do anything if a schedule is in place.

Hi, I will check that, and let you know how to do it. Maybe it is a bug, then I will fix it.

The thing with the schedule is, that it overrides ANY manual settings. So it does not work the other way round as there is only 1 state, and it is not possible for the script to determine if the state was set manually or automatically. I will think about implementing a new feature to allow the manual override too.

Hi, I bought the script but some things not works fine. I want show status automatically and followed Introduction but always show Open Status.

I need to this script urgently and hope you help me to solve this problem Asap.

This is the code I’ve used:

<?php require_once(“OpenClose.class.php”);

$status = new OpenClose();
   $status->setOpenHours(array(
          "Mon"=>"13:00-23:00",
          "Tue"=>"13:00-23:00",
          "Wed"=>"13:00-23:00",
          "Thu"=>"13:00-23:00",
          "Fri"=>"15:00-02:00",
          "Sat"=>"15:00-02:00",
          "Sun"=>"15:00-23:00",
       ));
// here we check the status, and output some text/sign
           if($status->isOpen()) 
           { 
               //echo "It's open"; 
               ?> 
               open 
               <?
} else {
?>
//echo "It's closed";
    ?>
    closed 
    <?
}

Look forward to hear from you soon.

Thank You

Hi, I think there can be 2 problems:

1. you don’t have permissions to write to the file which keeps the status – ‘status.txt’ – if so, you need to add permissions to write to that file, or if add permission to the folder, so the script can create the file

2. you have a wrong timezone setting, so the script maybe works, but shows OPEN in a diffferent time.

Try to add this add top of you code, so we can check which problem you have.
var_dump(date("D G:i"));
var_dump(date_default_timezone_get());
var_dump(substr(sprintf('%o', fileperms('status.txt')), -4));

And send me the output you got.

Hi, Thank you very much for fast reply.

This is outpot: string(8) “Wed 7:28” string(15) “America/Chicago” string(4) “0644”

My server Time is UK/London and I want it’s working according UK/London time. I see status changed to Close however it’s wrong Status and must Show Open now. Looks like I have a wrong timezone setting. Could you tell me how can I solve this issue? ( My PHP knowledge is less than zero :d )

try setting this at the beginning of your script:
date_default_timezone_set("Europe/London");
or
ini_set('date.timezone', "Europe/London");

One of those should work :)

Thank You! It’s working fine now :) Your support is Amazing. Outstanding Experience! Highly recommended .

by
by
by
by
by
by