Calendar sorting

Follow

Comments

6 comments

  • Avatar
    Zetya Support

    Hi Les,

    There is support for doing this but it would required some development work on your part.

    limit the calendar view to one product if my customer is coming to the calendar from that products page?

    I would do that by creating a link to the calendar page and appending the product handle to it - e.g. /apps/bookthatapp/calendar?handle=foo. Then on the calendar page you'd look for the handle and apply the filter. The calendar template already supports filtering so you would just need to set the dropdown to the match the handle.

    Is there a way to limit the calendar to a specific group of products

    I think the easiest way to do this is to hijack the location drop down (assuming you aren't already using it). The location drop down is provided in the default calendar template but commented out so to experiment make sure you uncomment it.

    have only the daytime rates appear if the customer is just looking for available time in the daytime.

    Not sure I follow this. Do you mean that if it is day time where the user is browsing from then hide the night time variants (on the product page)?

    Thanks, Gavin.

  • Avatar
    Les Pardew

    Hi Gavin,

    We offer full room bookings during our daytime hours and individual bookings in the evenings. Many of our customers us us for team building activities so we want to have a calendar with just the daytime products on it if they are coming to the calendar from our daytime group rate page.

    Thanks

    Les

  • Avatar
    Zetya Support

    Oh, ok sure in that case I'd suggest going with the location idea, and passing that through to the calendar page the same way as you would pass the product handle - e.g. /apps/bookthatapp/calendar?group=daytime

  • Avatar
    Jake Howell

    Hi Gavin,

    I'm a developer helping Les get this functionality in place. I've managed to hijack the calendar to sort based on a "room" filter. For example, if you go to the site and type in http://mystery-escape-room.myshopify.com/apps/bookthatapp/calendar?room=da-vincis-secret, it will show you the calendar page with only that room in the calendar.

    My question is, can I pass multiple parameters to the sorting? Something like, http://mystery-escape-room.myshopify.com/apps/bookthatapp/calendar?room=da-vincis-secret&da-vincis-secret-2?

    Basically, their products are booking times for their mystery escape room and want to be able to show both booking times for the room. So, in the example above, davincis-secret-2 would be daytime bookings, and davincis-secret would be night time bookings. Is this possible in the current version of BookThatApp?

    Thanks,

    Jake

  • Avatar
    Zetya Support

    Hi Jake,

    I'll need to add the ability to filter by more than one handle. I'll get to this in the next day or so.

    Thanks, Gavin.

  • Avatar
    Zetya Support

    Hi Jake,

    I looked at the code again and realised you can already do this. The trick is to pass in a comma separated list of product ids - e.g. &products=1,2,3

    Thanks, Gavin.

Please sign in to leave a comment.