User documentation

⌘K
  1. Home
  2. User documentation
  3. Resource Availability
  4. Display the list of assigned or available resources (shortcode)

Display the list of assigned or available resources (shortcode)

You can see and manage the assigned resources from the backend, but it is also possible to display them on the frontend with the [bookingactivities_resources] shortcode.

Resources shortcode options

You can use the [bookingactivities_resources] shortcode to display the assigned resources / or the available resources, over a period / or for an event, depending how you configure it:

Attribute Expected value
in__resource_id Resource ID(s) (integer) (comma separated). Display only these resources.
in__allocation_id Allocation ID(s) (integer) (comma separated). Display only the resources assigned from these allocations.
from Starting date and time (YYYY-MM-DD HH:mm:ss format, or a compatible relative format such as today or next monday). This date is inclusive.
Default: today or not set if to, event_start or event_end is set.
to Ending date (YYYY-MM-DD HH:mm:ss format, or a compatible relative format such as +7 day or last day of this month). This date is exclusive.
Default: tomorrow or not set if from, event_start or event_end is set.
in__event_id Event ID(s) (integer) (comma separated). Display only the resources assigned to these events or their bookings.
event_start Starting date and time (YYYY-MM-DD HH:mm:ss format). Display only the resources assigned to a booking or an event starting on this exact date and time.
event_end Ending date and time (YYYY-MM-DD HH:mm:ss format). Display only the resources assigned to a booking or an event ending on this exact date and time.
order_by Order the list by data (allowed values: id, resource_id, allocation_id, event_id, event_start, event_end, booking_quantity) (ordered and comma separated).
Default: id.
order Sorting order of the list (allowed values: asc or desc).
Default: desc.
in__user_id User ID(s) (integer) (comma separated). Display only the resources assigned to these users’ bookings.
not_in__user_id User ID(s) (integer) (comma separated). The resources assigned to these users’ bookings won’t be displayed.
in__booking_id Booking ID(s) (integer) (comma separated). Display only the resources assigned to these bookings.
not_in__booking_id Booking ID(s) (integer) (comma separated). The resources assigned to these bookings won’t be displayed.
in__booking_status Allowed booking statuses (allowed values: delivered, booked, pending, cancelled, refunded, refund_requested, in_cart, expired, removed) (comma separated).
in__booking_group_id Booking group ID(s) (integer) (comma separated). Display only the resources assigned to these booking groups.
in__booking_group_date Booking group starting date(s) (YYYY-MM-DD format) (comma separated). Display only the resources assigned to the booking groups starting on these dates.
in__event_group_id Group of events ID(s) (integer) (comma separated). Display only the resources assigned to these groups of events.
active 1 to display only the resources assigned to active bookings. 0 to display the only the resources assigned inactive bookings.
per_booking 1 to display only the resources assigned per booking. 0 to display the only the resources assigned per event.
columns Displayed columns (allowed values: assignment_id, resource_id, resource_title, category_id, category_title, quantity, quantity_out_of_total, availability, availability_out_of_total, total_availability, booking_id, activity_id, event_id, event_title, event_start, event_end) (ordered and comma separated).
Default: resource_title,quantity.
show_unassigned_resources 1 to display a row for each resource even if they are not assigned.
Default: 0.
one_row_per_assignment 1 to display one row for each resource assignment instead of one row per resource (0).
Default: 0.

Shortcode examples

  • Display the resources assigned today and their quantity:
    • [bookingactivities_resources]
  • Display the resources assigned to event #17 which starts on 2023-04-01 10:00:00 and ends on 2023-04-01 10:30:00:
    • [bookingactivities_resources in__event_id="17" event_start="2023-04-01 10:00:00" event_end="2023-04-01 10:30:00"]
  • Display the resources available between 2023-04-01 10:00:00 and 2023-04-01 10:29:59:
    • [bookingactivities_resources show_unassigned_resources="1" from="2023-04-01 10:00:00" to="2023-04-08 10:30:00" columns="resource_title,availability"]
    • Note that the to parameter is exclusive

 

Resources in notifications

You can use specific tags to display the resource list in notifications:

  • {resources}“: Comma-separated list of all the resources assigned to the booking and the event, and their quantity
  • {booking_resources}“: Comma-separated list of the resources assigned to the booking only, and their quantity
  • {event_resources}“: Comma-separated list of the resources assigned to the event only, and their quantity

 

Resources in frontend booking lists

You can also display the resources in distinct columns in the frontend booking lists, see the available columns in this documentation.

 

Resources in cart and order items

Finally, the resources are automatically displayed in the WooCommerce cart items and the order items, except if you have set the resource as hidden in its settings.

How can we help?