Created
November 1, 2012 12:41
-
-
Save deivisonarthur/3993414 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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