GD v2.0.0.55: Business Hours issue
This topic contains 23 replies, has 5 voices, and was last updated by Alex Rollin 6 years, 5 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: expand
-
AuthorPosts
-
April 16, 2019 at 1:23 pm #481115
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.April 16, 2019 at 6:24 pm #481166Hi,
please provide a link and admin credentials in a private reply, so that we check your site.
Screenshots can’t be debugged.
Thanks
April 16, 2019 at 11:52 pm #481220This reply has been marked as private.April 17, 2019 at 2:06 pm #481362This reply has been marked as private.April 25, 2019 at 9:56 am #482772Hello 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.
April 25, 2019 at 9:57 am #482773This reply has been marked as private.April 25, 2019 at 2:14 pm #482835This reply has been marked as private.April 25, 2019 at 4:43 pm #482866This reply has been marked as private.April 26, 2019 at 12:57 pm #483050Hello 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
April 26, 2019 at 1:05 pm #483052Thank 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 😉
April 26, 2019 at 1:10 pm #483053This 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
April 26, 2019 at 1:20 pm #483057This reply has been marked as private.April 26, 2019 at 2:23 pm #483068My 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
April 27, 2019 at 1:48 pm #483170Thanks 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.
April 27, 2019 at 6:54 pm #483229There isn’t a setting for that, but we have a note to look at adding that for a future version.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket