Answer the question
In order to leave comments, you need to log in
Where is the final price calculated in the confirm.php checkout?
v 3.0.3.3
Hello guys, can you please tell me where in confirm.php the final price is calculated (not the amount, but the total - how can a discount coupon be applied)?
I need this in order to add the shipping cost to the total if the total is less than 5K.
Found f-th
$this->cart->getSubTotal();
// или
$this->cart->getTotal();
Answer the question
In order to leave comments, you need to log in
Before line:
$this->{'model_extension_total_' . $result['code']}->getTotal($total_data);
if ($result['code'] =='total' && $total_data['total'] < 5000) {
$this->session->data['shipping_method'] = array(
'code' => 'flat',
'title' => 'Доставка',
'quote' => '100 грн',
'cost' => '100',
'sort_order' => 1,
'error' => ''
);
$total_data['totals'][] = array(
'code' => 'shipping',
'title' => $this->session->data['shipping_method']['title'],
'value' => $this->session->data['shipping_method']['cost'],
'sort_order' => 8
);
$total_data['total'] += $this->session->data['shipping_method']['cost'];
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question