| Аргумент | Возможный тип | Описание |
| $order_info | — | — |
| $order_total | — | — |
$code = '';
$start = strpos($order_total['title'], '(') + 1;
$end = strrpos($order_total['title'], ')');
if ($start && $end) {
$code = substr($order_total['title'], $start, $end - $start);
}
$this->load->model('checkout/coupon');
$coupon_info = $this->model_checkout_coupon->getCoupon($code);
if ($coupon_info) {
$this->model_checkout_coupon->redeem($coupon_info['coupon_id'], $order_info['order_id'], $order_info['customer_id'], $order_total['value']);
}