Puede personalizar las frases utilizadas en el widget del sitio web de Bitrix24.
Use el código de JavaScript para hacerlo:
<script>window.addEventListener('onBitrixLiveChat', function(event)
{
var widget = event.detail.widget;
widget.subscribe({
type: BX.LiveChatWidget.SubscriptionType.configLoaded,
callback: function()
{
widget.addLocalize({VARIABLE: 'New Text'});
}
});
});</script>
Aquí tiene unos ejemplos de frases del widget que puede personalizar:
BX_LIVECHAT_LOADING – "Please wait"BX_LIVECHAT_ERROR_TITLE – "Unfortunately we could not load live chat :("BX_LIVECHAT_ERROR_DESC – "Please use some other communication tool or try again later."BX_LIVECHAT_VOTE_BUTTON – "Rate our service"BX_MESSENGER_TEXTAREA_PLACEHOLDER – "Enter message..."console.table(BXLiveChat.__privateMethods__.localize);
Puede agregar nuevas frases al código como una cadena o como una matriz:
<script>window.addEventListener('onBitrixLiveChat', function(event)
{
var widget = event.detail.widget;
widget.subscribe({type: BX.LiveChatWidget.SubscriptionType.configLoaded,
callback: function(){widget.addLocalize({BX_LIVECHAT_LOADING: 'Wait, Live Chat is loading'});
widget.addLocalize({BX_LIVECHAT_ERROR_TITLE: 'Oops, something went wrong'});
widget.addLocalize({BX_LIVECHAT_VOTE_BUTTON: 'Give us a score!',
BX_LIVECHAT_OFFLINE: 'Sorry, our agents are sleeping',
BX_LIVECHAT_ONLINE_LINE_1: 'Our team',
BX_LIVECHAT_ONLINE_LINE_2: 'is ready to help you',
BX_LIVECHAT_ERROR_DESC: 'Chat is down for repairs',
BX_MESSENGER_TEXTAREA_PLACEHOLDER: 'Type your question',
})
}
});
});
</script>
¿Cómo insertar el código?
En la sección de Sitios, seleccione el sitio web. Luego hay que agregar un bloque nuevo.
Deslícese hacia abajo > haga click en Otro > Código HTML.
Pulse Editar.
Pegue el código > haga click en Guardar > Publicar.
¡Listo! Las frases utilizadas en el widget del sitio web se han personalizado correctamente!
No puede personalizar con Javascript las siguientes frases:
BX_LIVECHAT_ONLINE_LINE_1 – "We are online"BX_LIVECHAT_ONLINE_LINE_2 – "and ready to help!"BX_LIVECHAT_OFFLINE – "One of our representatives will get back to you shortly!"Para editar las frases destacadas, vaya a la configuración del canal abierto y modifique los valores de campos Texto de respuesta automática.





