1: | <?php
|
2: | namespace Opencart\Catalog\Model\Extension\Opencart\Total;
|
3: | |
4: | |
5: | |
6: | |
7: |
|
8: | class Tax extends \Opencart\System\Engine\Model {
|
9: | |
10: | |
11: | |
12: | |
13: | |
14: | |
15: | |
16: | |
17: |
|
18: | public function getTotal(array &$totals, array &$taxes, float &$total): void {
|
19: | foreach ($taxes as $key => $value) {
|
20: | if ($value > 0) {
|
21: | $totals[] = [
|
22: | 'extension' => 'opencart',
|
23: | 'code' => 'tax',
|
24: | 'title' => $this->tax->getRateName($key),
|
25: | 'value' => $value,
|
26: | 'sort_order' => (int)$this->config->get('total_tax_sort_order')
|
27: | ];
|
28: |
|
29: | $total += $value;
|
30: | }
|
31: | }
|
32: | }
|
33: | }
|
34: | |