It can be done easily by modifying following file.
/catalog/model/total/handling.php
Could you plese tell us which version of Opencart are you using so that we can help you.
/catalog/model/total/handling.php
Could you plese tell us which version of Opencart are you using so that we can help you.
Regards,
Knowband Team
Opencart Plugins: Knowband Store
Email: support@knowband.com
Edit below file
/catalog/model/total/phandling.php
and make changes as shown below
/catalog/model/total/phandling.php
and make changes as shown below
Code: Select all
<?php
class ModelTotalHandling extends Model {
public function getTotal($total) {
if (($this->cart->getSubTotal() > $this->config->get('handling_total')) && ($this->cart->getSubTotal() > 0)) {
$this->load->language('total/handling');
$handlingfee=($this->config->get('handling_fee')/100)*$this->cart->getTotal();
$total['totals'][] = array(
'code' => 'handling',
'title' => $this->language->get('text_handling'),
'value' => $handlingfee,
'sort_order' => $this->config->get('handling_sort_order')
);
if ($this->config->get('handling_tax_class_id')) {
$tax_rates = $this->tax->getRates($handlingfee, $this->config->get('handling_tax_class_id'));
foreach ($tax_rates as $tax_rate) {
if (!isset($total['taxes'][$tax_rate['tax_rate_id']])) {
$total['taxes'][$tax_rate['tax_rate_id']] = $tax_rate['amount'];
} else {
$total['taxes'][$tax_rate['tax_rate_id']] += $tax_rate['amount'];
}
}
}
$total['total'] += $handlingfee;
}
}
}
Regards,
Knowband Team
Opencart Plugins: Knowband Store
Email: support@knowband.com
Code: Select all
<?php
class ModelExtensionTotalHandling extends Model {
public function getTotal($total) {
if (($this->cart->getSubTotal() > $this->config->get('total_handling_total')) && ($this->cart->getSubTotal() > 0)) {
$this->load->language('extension/total/handling');
$handlingfee = ($this->config->get('total_handling_fee') / 100) * $this->cart->getTotal();
$total['totals'][] = array(
'code' => 'handling',
'title' => $this->language->get('text_handling'),
'value' => $handlingfee,
'sort_order' => $this->config->get('total_handling_sort_order')
);
if ($this->config->get('total_handling_tax_class_id')) {
$tax_rates = $this->tax->getRates($handlingfee, $this->config->get('total_handling_tax_class_id'));
foreach ($tax_rates as $tax_rate) {
if (!isset($total['taxes'][$tax_rate['tax_rate_id']])) {
$total['taxes'][$tax_rate['tax_rate_id']] = $tax_rate['amount'];
} else {
$total['taxes'][$tax_rate['tax_rate_id']] += $tax_rate['amount'];
}
}
}
$total['total'] += $handlingfee;
}
}
}
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: No registered users and 0 guests