Copy link to clipboard
Copied
I am trying to make custum alert messages in Portuguese on a Adobe Business Catalyst website using this code from : Customizing Online Shop Alert Message Strings
and also customize the online shop layout strings like "Shoping cart is empty! continue shooping " and "1 item(s), Total: €12,00 VIEW CART" to "Carrinho de compras vazio! continuar as compras." and "1 item(s), Total:€ 12,00 VER CARRINHO DE COMPRAS"using this piece of code i found somewere on the Adobe forum too:
<script type="text/javascript">
var ele = GetElementsByClass('cartLink');
if(ele[0]) ele[0].innerHTML = 'O CARRINHO DE COMPRAS ESTÀ `enter code here`VAZIO!';// replace with your own message!
function UpdateProductExtras(c, p, res) {
document.getElementById('catCartDetails').innerHTML = 'O carrinho de compras está vazio! <a href="/catalogos">VOLTAR</a>'; // replace with your own message!
}
/*
var ele = GetElementsByClass('cartSummaryItem');
if(ele[0]) ele[0].innerHTML = 'Carrinho de compras vazio.';// replace with your own message!
function UpdateProductExtras(c, p, res) {
document.getElementById('cartSummaryItem').innerHTML = 'Carrinho de compras vazio.'; // replace with your own message!
}*/This one works but if we click to buy something then this doesn't show: "1 item(s), Total: €12,00 VIEW CART"
var ele = GetElementsByClass('cartSummaryLink');
if(ele[0]) ele[0].innerHTML = 'Ver carrinho de compras >';// replace with your own message!
function UpdateProductExtras(c, p, res) {
document.getElementById('cartSummaryLink').innerHTML = 'Ver carrinho de compras >'; // replace with your own message!
}
</script>
The piece of code seems to work, but everytime BC fires a pop up window, like wen we add a new product to the shoping cart or wen we hit the empty shoping cart button, they go back to the original strings in English, and only when we refresh the browser or move to another catalog and continue shoping, the messages go back to Portuguese. Can anyone give me a hand on how to Fix this?
The same happens to the pop up window messages from the js file from Customizing Online Shop Alert Message Strings, they only change to Portuguese if we refresh the browser,every time we make a new action, the pop up window messages go back to english.
There is an AJAX refresh of the DIV when you click certain items, you need to rebind your javascript on the refresh of the content.
Copy link to clipboard
Copied
There is an AJAX refresh of the DIV when you click certain items, you need to rebind your javascript on the refresh of the content.