Vitals: Reviews, Bundles (40+) offers conversion-boosting tools for your store.
To use Vitals: Reviews, Bundles (40+) with Zapiet - Pickup + Delivery, you need to add a code snippet to make sure the checkout button in the cart page remains locked until the details in our widget are selected.
In Vitals: Reviews, Bundles (40+), click Settings.
Copy and paste the following code to the Custom JS Hooks field.
VITALS_HOOK__CAN_EXECUTE_CHECKOUT = function() {
if (typeof window.Zapiet !== 'undefined' && typeof window.Zapiet.Widget !== 'undefined') {
if (Zapiet.Widget.checkoutEnabled()) {
return true;
} else {
var method = 'shipping';
if ($('.checkoutMethodContainer.pickup').length) {
method = 'pickup';
}
if ($('.checkoutMethodContainer.delivery').length) {
method = 'delivery';
}
var errorMessage = ZapietCachedSettings.cached_config.translations[method].checkout_error;
ZapietEvent.fire("checkout_error", errorMessage);
return false;
}
}
return true;
}
VITALS_HOOK__GET_CUSTOM_CHECKOUT_URL_PARAMETERS = function() {
var params = {};
if (Zapiet.Widget.getCheckoutParams()) {
Object.entries(Zapiet.Widget.getCheckoutParams()).forEach(([key, value]) => {
params[key] = value;
});
}
return params;
}Click Save.
Checkout button will now remain locked until the customer has selected information in Zapiet - Pickup + Delivery widget.
If you have any questions regarding Vitals: Reviews, Bundles (40+), please contact their support team at [email protected].