Forum Academy Marketplace Showcase Pricing Features

Any tips for managing opening hours?

Hello dear Bubblers!

I’d love getting advices or tips regarding a efficient way to manage opening hours for shops, with Bubble.

These shops can either be opened for the day (from hour H1 to hour H2), either have a break in between (so opened from H1 to H2, than from H3 to H4).

Not sure what’s the best way to achieve this in the database. At the moment, I’ve created 28 fields in my database for each shop… MondayH1, mondayH2, MondayH3 and so on… And I really don’t like that. I’m pretty sure I can do better.

Also, if I’d like to implement a “currently opened” functionality, to let people know in real time if these shops are opened or closed. With my previous (ugly) method, not so easy to provide this result in case a shop opens at 8am but close at 2am (aka closed the day after, at 2am).

Well, that being said, if anybody has good advice or tips, or even tutorial, to share with me/us, I’d be very happy and will pay beers to all :smile:

Cheers

1 Like

I’ve found a “tips” topic, by @ambroisedlg (thanks Ambroise). My understanding is that I can optimize my implementation (for sure, create a openhours_day data type and instantiate this data type for each of the 7 days of the week. That will avoid these f**king 28 data fields in my shop data type :roll_eyes:

Let’s see. I try to go further and will let you know (at least me :blush:) if I succeed in getting the expected result!

2 Likes

UP - I am experiencing the same issue…

did you ever find a solution?