O Vitals: Avaliações, Upsells, IA oferece ferramentas para aumentar as conversões em sua loja.
Para usar o Vitals: Avaliações, Upsells, IA com o Zapiet - Retirada + Entrega, você precisará adicionar um trecho de código para garantir que o botão de checkout na página do carrinho permaneça bloqueado até que os detalhes em nosso widget sejam selecionados.
No Vitals: Avaliações, Upsells, IA, clique em Configurações.
Copie e cole o seguinte código no campo JS Hooks Personalizados:
vitalsSet('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;
});
vitalsSet('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;
});Clique em Salvar.
O botão de checkout agora permanecerá bloqueado até que o cliente tenha selecionado as informações no widget Zapiet - Retirada + Entrega.
Se tiver alguma dúvida sobre o Vitals: Avaliações, Upsells, IA, entre em contato com a equipe de suporte pelo e-mail [email protected].