Skip to content

Instantly share code, notes, and snippets.

@deivisonarthur
Created November 1, 2012 12:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deivisonarthur/3993414 to your computer and use it in GitHub Desktop.
Save deivisonarthur/3993414 to your computer and use it in GitHub Desktop.
/* deivison 02
FUNÇÃO QUE EXECUTA PASSO A PASSO DE ATUALIZAÇÃO DOS CAMPOS PAYMENTS E REVIEW
-------------------------------------------------------------------------------------------------------------------------------
Essa função foi feita para atualização dos valores, caso haja desconto para pagamentos específicos como 10% pagamento no boleto
-------------------------------------------------------------------------------------------------------------------------------
Métodos de atualiação
'payment-method': 1, <- Atualiza os meios de pagamentos
'shipping-method': 1, <- Atualiza os métodos de envio
'review': 1 <- Atualiza o resumo da compra
*/
//var $j = jQuery.noConflict();
//Para atualizar caso tenha desconto no boleto
$j(function($) {
$j('input[name*="payment[method]"]').live('click', function() {
checkout.update({
'review': 1
,'shipping-method': 1
,'payment-method': 1
});
setTimeout(function(){
checkout.update({
'review': 1
,'payment-method': 1
});
}, 1000);
});
$j('input[name*="shipping_method"]').live('click', function() {
checkout.update({
'review': 1
,'payment-method': 1
'shipping-method': 1
});
setTimeout(function(){
checkout.update({
'review': 1,
'payment-method': 1
});
}, 500);
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment