Answer the question
In order to leave comments, you need to log in
Opencart 3 how to add your price to the total cost when placing an order?
I mean controller/checkout/confirm.php
Here is the output of the final (total) cost of all goods at the last step "order confirmation":
$data['products'][] = array(
...
'total' => $this->currency->format($this->tax->calculate($product['price'], $product['tax_class_id'], $this->config->get('config_tax')) * $product['quantity'], $this->session->data['currency']),
...
if (isset($this->request->post['totalDeliveryPrice'])){
if (!empty($this->request->post['totalDeliveryPrice'])) {
$totalDeliveryPrice = $this->request->post['totalDeliveryPrice'];
}
else{
$totalDeliveryPrice = 0;
}
} else{
$totalDeliveryPrice = 0;
}
'total' => $this->currency->format($this->tax->calculate($product['price'], $product['tax_class_id'], $this->config->get('config_tax')) * $product['quantity'], $this->session->data['currency'], $totalDeliveryPrice),
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question