opencart получить общую цену в корзине при выбранном способе оплаты

Это мой код способа оплаты для opencart:

<?php
class ControllerPaymentportmanat extends Controller {
protected function index() {
$this->data['button_confirm'] = $this->language->get('button_confirm_portmanat');

$this->data['continue'] = $this->url->link('checkout/success');
$this->data['order_id'] = $this->session->data['order_id'];

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/payment/portmanat.tpl')) {
$this->template = $this->config->get('config_template') . '/template/payment/portmanat.tpl';
} else {
$this->template = 'default/template/payment/portmanat.tpl';
}

$this->render();
}

public function confirm() {
$this->load->model('checkout/order');

$this->model_checkout_order->confirm($this->session->data['order_id'], $this->config->get('portmanat_order_status_id'));
}
}
?>

Как я могу получить ток ВСЕГО размер в моем коде? Я хочу определить ВСЕГО цена на мой код.

0

Решение

Вы можете получить информацию о заказе, используя getOrder и используя order_id, сохраненный в сеансе:

$order_info = $this->model_checkout_order->getOrder($this->session->data['order_id']);

Теперь вы можете получить сумму заказа, используя $ order_info [‘total’]

0

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector