Back to Opencart

File catalog\model\account\approval.php

docs/api/source-catalog.model.account.approval.html

4.1.0.34.9 KB
Original Source

Namespaces

Classes

| 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