Hi,
I followed the codes from the service list template for my website, but somehow it is not returning the service availability, I wonder if I have done something wrong?
ww.wix.com/corvid/example/service-list
// Set up each item in the services repeater as it is loaded. Note that
// most of the repeater elements are populated using a dataset.
export async function repeater1_itemReady($item, itemData, index) {
// Get the item's service ID.
const serviceID = itemData._id;
// Retrieve the available slots for the item's service.
const availability = await wixBookings.getServiceAvailability(serviceID);
// Store the first available slot as the next available slot.
const nextAvailableSlot = availability.slots[0];
// If there is an available slot:
if (nextAvailableSlot) {
// Set the nextSlot text to the month and day of the next available slot.
$item("#nextSlot").text = getMonthDay(nextAvailableSlot.startDateTime);
}
// If there are no available slots:
else {
// Set the nextSlot text to ???.
$item("#nextSlot").text = "No available classes yet";
}
// Get the month and day of the given date formatted as DD/MM.
function getMonthDay(date) {
return date.toLocaleDateString([], { day: "numeric", month: "numeric" });
}
}
My website: chiwawa . fun/test-class-page
It’s pretty simple now as the filters themselves already took me enough to figure out… If someone can also tell me how to add a reset button and a keyword search bar, that will be fantastic. Thank you so much!!!
p.s. For the filters, I followed the codes on this thread , it works perfectly for me!
w ww. wix.com/corvid/forum/community-discussion/solved-multiple-group-check-boxes-to-filter-a-dataset-and-filter-update-a-drop-down
p.p.s the links contain spaces within it as I am not allowed to post URLs…? Not sure why…