1: | <?php
2: | namespace Opencart\Catalog\Model\Extension\Opencart\Total;
3: | /**
4: | * Class Tax
5: | *
6: | * @package Opencart\Catalog\Model\Extension\Opencart\Total
7: | */
8: | class Tax extends \Opencart\System\Engine\Model {
9: | /**
10: | * Get Total
11: | *
12: | * @param array<int, array<string, mixed>> $totals
13: | * @param array<int, float> $taxes
14: | * @param float $total
15: | *
16: | * @return void
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: |

OpenCart API API documentation generated by ApiGen dev-master