Last active
December 25, 2015 01:19
-
-
Save onefriendaday/6893778 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function update_cart(val, zip) { | |
$.post(update_cart_url,{shipping_method:val,zip:$('#zip_code').val(),ajax:true}, function(data) { | |
$('.shipping_cost').html(data); | |
update_moip(); | |
}); | |
} | |
function update_moip() { | |
$('input[name=moip_parcel]').html(''); | |
var value = parseFloat($('.total-value').text()); | |
for (var i = 1; i <= 10; i++) { | |
installment = (value / i).toFixed(2); | |
$('input[name=moip_parcel]').append('<option value="'+i+'">'+i+'x de R$ '+installment+' (Sem Juros)</option>'); | |
}; | |
} | |
<?php | |
Replace... | |
$content = '<span class="total">'.lang('grand_total').': $R '.format_currency($this->loja->total()).'</span>'; | |
with... | |
$content = '<span class="total">'.lang('grand_total').': $R <span class="total-value">'.format_currency($this->loja->total(), false).'</span></span>'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment