public function getTotal($total) { $this->load->language('extension/total/payment_system_deposit'); if ( (!empty($this->session->data['ps_cart']) || $this->config->get('module_payment_system_allow_checkout')) && isset($this->session->data['ps_term_id']) ) { $ps_terms = $this->db->query("SELECT * FROM `" . DB_PREFIX . "ps_term` WHERE `ps_term_id` = '" . (int)$this->session->data['ps_term_id'] . "'"); if (!$ps_terms->num_rows) { return; // safety check } $product_total = 0.0; foreach ($this->cart->getProducts() as $product) { $valid_product = $this->cart->checkPsStatus($product['product_id']); if (!$valid_product && !$this->config->get('total_payment_system_all_products')) { continue; // skip if product not part of deposit scheme } $price = isset($product['price']) ? $product['price'] : 0; $tax_class_id = isset($product['tax_class_id']) ? $product['tax_class_id'] : 0; $product_total += $this->tax->calculate($price, $tax_class_id) * $product['quantity']; } // Deduct vouchers $voucher_total = 0.0; if (!empty($this->session->data['vouchers'])) { foreach ($this->session->data['vouchers'] as $voucher) { $voucher_total += isset($voucher['amount']) ? (float)$voucher['amount'] : 0; } } // Apply 10% deposit on (product_total - voucher_total) $base_total = max(0, $product_total - $voucher_total); $total_due = $base_total * 0.10; // Optionally add admin fee and shipping $term = $ps_terms->row; if ($term['admin_fee'] > 0) { $total_due += $term['admin_fee']; } if (!empty($this->session->data['shipping_method'])) { $total_due += $this->tax->calculate( $this->session->data['shipping_method']['cost'], $this->session->data['shipping_method']['tax_class_id'], $this->config->get('config_tax') ); } $remaining_balance = $total['total'] - $total_due; $this->session->data['ps_due_today'] = $total_due; $this->session->data['ps_balance'] = $this->currency->format($remaining_balance, $this->session->data['currency'], false, false); $total['totals'][] = array( 'code' => 'payment_system_total', 'title' => $this->language->get('text_payment_system_total'), 'value' => $total_due, 'sort_order' => $this->config->get('total_payment_system_deposit_sort_order') ); $total['totals'][] = array( 'code' => 'payment_system_balance', 'title' => sprintf($this->language->get('text_payment_system_balance'), $this->config->get('total_payment_system_button_name')), 'value' => $remaining_balance, 'sort_order' => $this->config->get('total_payment_system_deposit_sort_order') + 1 ); } } Notice: Undefined property: Proxy::getTotal in /var/www/vhosts/collectiblesdirect.co.uk/httpdocs/vqmod/vqcache/vq2-_var_www_vhosts_collectiblesdirect.co.uk_storage_modification_system_engine_action.php on line 79