GD v2.0.0.55: Business Hours issue

This topic contains 23 replies, has 5 voices, and was last updated by  Alex Rollin 5 years, 6 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #481115

    Brigitte
    Expired Member
    Post count: 235

    Hello,

    It seems that Business Hours is not working properly at home. Still, the parameters of WordPress are correct (look screenshot). Any ideas?

    Thank you in advance for your advice to resolve this problem.

    Cheers,
    Ady Salvia.

    #481166

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    please provide a link and admin credentials in a private reply, so that we check your site.

    Screenshots can’t be debugged.

    Thanks

    #481220

    Brigitte
    Expired Member
    Post count: 235
    This reply has been marked as private.
    #481362

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    #482772

    Brigitte
    Expired Member
    Post count: 235

    Hello Kiran,

    The timezone (+2) is correct because the “Business Hours” feature apparently uses the same timezone as the WordPress configuration.

    At the time of writing, it is 11:45, and the Business Hours feature indicates that the facility is closed, while it is scheduled to close at 12:30.

    I just did a test, if I change the timezone of the “Business Hours” feature to +1 (instead of +2), it seems to work.

    But we agree that this is not normal? Because I will have to manually edit each place?

    Is it a bug or is it me that does a bad configuration?

    Thanks.

    #482773

    Brigitte
    Expired Member
    Post count: 235
    This reply has been marked as private.
    #482835

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    #482866

    Brigitte
    Expired Member
    Post count: 235
    This reply has been marked as private.
    #483050

    Kiran
    Moderator
    Post count: 7069

    Hello Adrian,

    Timezone offset saved for each listing with business hours data. So if you need to change offset value for listing then you have to edit it for each listing.

    If you don’t want to update for each listing then you can use following snippet to use common timezone offset for each listing. You can set your own offset, currently i have used +1:00.

    
    
    function gd_snippet_get_business_hours( $hours, $data ) {
    	if ( ! empty( $hours ) && ! empty( $hours['extra'] ) && isset( $hours['extra']['offset'] ) ) {
    		$hours['extra']['offset'] = '+1:00'; // Set timezone offset Ex: +1:00 or +5:30 or -7:00
    	}
    
    	return $hours;
    }
    add_filter( 'geodir_get_business_hours', 'gd_snippet_get_business_hours', 10, 2 );

    Let us know.

    Kiran

    #483052

    Brigitte
    Expired Member
    Post count: 235

    Thank you for your answer Kiran.

    But what was the problem?
    Because the Timezone was well set on the place in detail, as well as WordPress settings.

    Thank you also for the code bulk, but for the moment there is only one place on my directory 😉

    #483053

    Kiran
    Moderator
    Post count: 7069

    This is default behavior. By default it chooses the offset of the default location.
    When you add/edit listing and if it there is address change then we send request via Google API to retrieve timezone for the address. This means it allows to set different timezone offset for each listing.

    Let us know.

    Kiran

    #483057

    Brigitte
    Expired Member
    Post count: 235
    This reply has been marked as private.
    #483068

    Kiran
    Moderator
    Post count: 7069

    My place is only located in France. That’s why I did not understand why there can be a change of timezone. My timezone is +2 everywhere. And this I have indicated in the settings of WordPress from the beginning.

    If address changed to region whcih has different timezone then France then it will auto TZ of that address.

    I do not know if it’s you or me, but the module no longer appears in frontpage.

    That field was excluded form package, i have put back.

    Let us know.

    Kiran

    #483170

    Brigitte
    Expired Member
    Post count: 235

    Thanks a lot for your answer. I have a last question :

    I would like the “Business Hours” module (on sidebar for example) to be auto-expand.

    How to do ? Thank you.

    #483229

    Alex Rollin
    Moderator
    Post count: 27815

    There isn’t a setting for that, but we have a note to look at adding that for a future version.

Viewing 15 posts - 1 through 15 (of 24 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount