Good morning!
On the company website that I work with, there are certain variables like this: {{order_total}}
In case, I need to make a simple script, to get the total value and add an HTML up front ...
$JQuery(function(){
var valordopedido = {{order_total}};
if(valordopedido >= 299){
$JQuery('<div class="msg-free_shipping"> <p><span class="warning">ATENÇÃO:</span> Comprando mais <span class="restante">R$259,10</span> você aproveita o <strong>FRETE GRÁTIS</strong> nas compras acima de <span class="valor-gratis">R$299,00</span></p> </div>').insertAfter('form#cart_update_post');
}});
It just gives the error: Uncaught SyntaxError: Unexpected token {
Would anyone help?
Thank you!