Business Hours – Individual adaptation

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

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

Open Support Ticket
  • Author
    Posts
  • #541231

    tm8gd
    Lifetime Member
    Post count: 3

    Hello Support Team,

    The option “Business Hours” is not suitable for many purposes. Many companies, shops, etc. have seasonal opening hours.

    However, I would like to use this field, because among other things I need the function of displaying the current status (Open/Close).

    Is it possible for us to make an adjustment here and what would it cost?

    Default would be:
    – Display of the opening hours as it is currently done in GD.
    – In the backend when entering the opening hours the selection from day/month to day/month is valid.

    We need a maximum of three seasonal time slots spread over the year.

    We work with the Elementor Page Builder and the extension Dynamic Content. For this reason it is already possible to display elements time-controlled.

    !!! It would also be sufficient to have the possibility to create the business hours several times in the settings of the post type. !!!

    Thanks a lot.

    #541340

    Kor
    Moderator
    Post count: 16516

    hi tm8gd,

    Thanks for your post. Sorry, what you needed there isn’t something that is currently possible to achieve out of the box. Allow me to forward this to a developer for a second opinion.

    #541346

    tm8gd
    Lifetime Member
    Post count: 3

    Hello, Kor,
    Yes please forward this to a developer. We need a solution here as soon as possible. We would not like to create an extra solution for the business hours and then have to maintain the data in two places.

    As already written, there are many shops, companies, which have seasonal opening hours. Actually this function should be available directly in GeoDirectory, I think there are many buyers who would use it.

    Thank you for your feedback, I am waiting for a developer’s answer.

    #541347

    Naveen Giri
    Moderator
    Post count: 1559

    Hi tm8gd,

    As Kor said there is no way to manage the business field for seasonal entry.
    but you can create the business hours several times in the settings using the below code.

    Please use the following code snippet to make the business field for multiple uses.
    follow these guidelines for adding custom code.
    https://wpgeodirectory.com/docs-v2/faq/customizing/#snippets

    
    add_filter('geodir_custom_fields_predefined','geodir_custom_fields_predefined_callback', 10, 2);
    function geodir_custom_fields_predefined_callback( $custom_fields, $post_type ){
        unset( $custom_fields['business_hours']['single_use'] );
    	unset( $custom_fields['business_hours']['defaults']['single_use'] );
        return $custom_fields;
    }
    

    Thanks
    Naveen

    #541353

    tm8gd
    Lifetime Member
    Post count: 3

    Hello Naveen,

    I have tested your approach.

    Yes, by inserting the filter in functions.php I can insert the predefined field “Business hours” several times in a post type (I am already satisfied with two times).

    I name the field identifier then e.g. business_hours_2

    If I want to create a new entry now, we will also display the two fields in the backend when we create it, but I cannot change anything for the first business hours (with the original field identifier (business_hours), the popup for setting hours and minutes does not appear. Even if I activate the field with “Yes”, then save the entry, this is set to “No” again and is therefore not activated.

    With the second additionally added field everything works.

    Here is a link to a video with a short screenshot.

    https://we.tl/t-mfILdbABoP

    Thanks for the help, maybe you can help me here. The solution would be to have the field “Business Hours” twice in one entry.

    #541357

    Naveen Giri
    Moderator
    Post count: 1559

    Hi tm8gd,

    Sorry, I rechecked. the scripts for business hours field is not managed to make it work for multiple times.

    We already have an improvement task for the business hours field. I have added a request. we are working on it, you can expect it in the future versions of geodirectory.
    https://github.com/AyeCode/geodirectory/issues/1122

    meanwhile, you can try https://geodirectoryexperts.com/ to build a customized business hours field.

    Regards
    Naveen

    #541359

    tm8gd
    Lifetime Member
    Post count: 3

    Hello Naveen,

    thank you very much for the efforts, then I hope that this functionality will be available in future versions.

    In the meantime, we will consider how to implement this.

    Hello Naveen,

    thank you very much for the efforts, then I hope that this functionality will be available in future versions.

    In the meantime, we will consider how to implement this.

    Thank you, please close this thread.

    With kind regards
    Thomas

    #542224

    neus
    Expired Member
    Post count: 15

    Hi!

    I wanted to ask if there any way for copy paste the hours when filling it.

    Thank you!

    #542392

    Alex Rollin
    Moderator
    Post count: 27815
Viewing 9 posts - 1 through 9 (of 9 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