Skip to content

Instantly share code, notes, and snippets.

@onefriendaday
Last active December 25, 2015 01:19
Show Gist options
  • Save onefriendaday/6893778 to your computer and use it in GitHub Desktop.
Save onefriendaday/6893778 to your computer and use it in GitHub Desktop.
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