Slide 9
Slide 9 text
public function submit()
{
$this->load->model('checkout/order');
$this->load->model('account/customer');
$order_info = $this->model_checkout_order->getOrder($this->session->data['order_id']);
$customer = $this->model_account_customer->getCustomer($order_info['customer_id']);
$discountPercentage = $this->config->get('checkout_boleto_discount_percentage');
$discountAmount = ($this->cart->getSubtotal() * $discountPercentage) / 100;
$json=array();
$json['amount'] = str_replace(array(".", ","), array("", ""), number_format($order_info['total'], 2
$json['button_text'] = $this->config->get('checkout_texto_botao') ? $this->config->get('checkout_tex
$json['boleto_discount_amount'] = number_format($discountAmount, 2, '', '');
$json['button_class'] = $this->config->get('checkout_button_css_class');
$payment_methods = $this->config->get('checkout_payment_methods');
if (count($payment_methods) == 1) {
$json['payment_methods'] = $payment_methods[0];
} else {
$json['payment_methods'] = $payment_methods[0] . ',' . $payment_methods[1];
}
$card_brands = '';
$card_brands_array = $this->config->get('checkout_card_brands');
foreach ($card_brands_array as $card_brand) {
if (reset($card_brands_array) == $card_brand) {
$card_brands .= $card_brand;
} else {
$card_brands .= ',' . $card_brand;
}
}
$json['card_brands'] = $card_brands;
/* Máximo de parcelas */
$max_installment = $this->config->get('checkout_max_installments');
$order_total = $order_info['total'];
$max_installment_value = $this->config->get('checkout_max_installment_value');
if($max_installment_value) {