1: | <?php
2: | namespace Opencart\Catalog\Model\Account;
3: | /**
4: | * Class Customer
5: | *
6: | * @package Opencart\Catalog\Model\Account
7: | */
8: | class Approval extends \Opencart\System\Engine\Model {
9: | /**
10: | * Add Customer Approval
11: | *
12: | * @param int $customer_id
13: | * @param string $type
14: | *
15: | * @return void
16: | */
17: | public function addApproval(int $customer_id, string $type): void {
18: | $this->db->query("INSERT INTO `" . DB_PREFIX . "customer_approval` SET `customer_id` = '" . (int)$customer_id . "', `type` = '" . $this->db->escape($type) . "', `date_added` = NOW()");
19: | }
20: |
21: | /**
22: | * Delete Customer Approvals
23: | *
24: | * @param int $customer_id
25: | *
26: | * @return void
27: | */
28: | public function deleteApprovals(int $customer_id): void {
29: | $this->db->query("DELETE FROM `" . DB_PREFIX . "customer_approval` WHERE `customer_id` = '" . (int)$customer_id . "'");
30: | }
31: | }
32: |

OpenCart API API documentation generated by ApiGen dev-master