Wix velo, integrating boulevard event category without opening as external site

Question:
I need to integrate the Boulevard Event booking widget into my Wix website. The goal is to ensure that when a client clicks the “Book Now” button, they are not redirected to an external website. Instead, the booking widget should appear directly within the Wix site. The code I have from Boulevard Event is: blvd.openBookingWidget({
urlParams: {
locationId: ‘c241a927-0be4-4fef-9050-3e0d0bdd1dbc’,
path: ‘/cart/menu/Ms.%20Smooth’,
visitType: ‘SELF_VISIT’
}
});

The problem I’m encountering is connecting this code to the button using its ID without getting an undefined error.

Product:
wix editor

What are you trying to achieve:
I need to integrate the Boulevard Event booking widget into my Wix website. The goal is to ensure that when a client clicks the “Book Now” button, they are not redirected to an external website. Instead, the booking widget should appear directly within the Wix site. The code I have from Boulevard Event is: blvd.openBookingWidget({
urlParams: {
locationId: ‘c241a927-0be4-4fef-9050-3e0d0bdd1dbc’,
path: ‘/cart/menu/Ms.%20Smooth’,
visitType: ‘SELF_VISIT’
}
});

The problem I’m encountering is connecting this code to the button using its ID without getting an undefined error.

What have you already tried:
i have tried using this code
$w.onReady(function () {
// Click event for Ms. Smooth
$w(“#bookMsSmoothButton”).onClick(() => {
try {
blvd.openBookingWidget({
urlParams: {
locationId: ‘c241a927-0be4-4fef-9050-3e0d0bdd1dbc’,
path: ‘/cart/menu/Ms.%20Smooth’,
visitType: ‘SELF_VISIT’
}
});
console.log(“Ms. Smooth booking widget opened successfully.”);
} catch (error) {
console.error(“Failed to open Ms. Smooth booking widget:”, error);
}
});

// Click event for Mr. Smooth
$w("#bookMrSmoothButton").onClick(() => {
    try {
        blvd.openBookingWidget({
            urlParams: {
                locationId: 'c241a927-0be4-4fef-9050-3e0d0bdd1dbc',
                path: '/cart/menu/Mr.%20Smooth',
                visitType: 'SELF_VISIT'
            }
        });
        console.log("Mr. Smooth booking widget opened successfully.");
    } catch (error) {
        console.error("Failed to open Mr. Smooth booking widget:", error);
    }
});

});