public function index() { if (\GC::totalItems() > 0) { $data['addresses'] = \CI::Customers()->get_address_list($this->customer->id); $this->view('checkout', $data); } else { $this->view('emptyCart'); } }
function setInventoryErrors(checks) { //remove pre-existing errors $('.errorAlert').removeClass('errorAlert'); $('.summaryStockAlert').remove(); //reprocess $.each(checks, function(key, val) { $('#cartItem-'+key).addClass('errorAlert').prepend('<div class="summaryStockAlert">'+val+'</div>'); }); } setInventoryErrors(inventoryCheck); updateItemCount(<?php echo GC::totalItems(); ?> ); var closeBtn = '<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'; var newGrandTotalTest = <?php echo GC::getGrandTotal() > 0 ? 1 : 0; ?> ; if(newGrandTotalTest != grandTotalTest) { getPaymentMethods(); grandTotalTest = newGrandTotalTest; //reset grand total test. } $('.quantityInput').bind('blur keyup', function(e){ if(e.type === 'blur' || e.which === 13)