# Class Opencart\Catalog\Model\Marketing\Coupon

`extends` | `Model`

Class Coupon

- Opencart\System\Engine\Model
  - Opencart\Catalog\Model\Marketing\Coupon

Located at catalog\model\marketing\coupon.php

Methods
`public` | `getCoupon(string $code): array<string, mixed>` Get Coupon Get Coupon | #
`public` | `getCouponByCode(string $code): array<string, mixed>` Get Coupon By Code Get Coupon By Code | #
`public` | `getProducts(int $coupon_id): array<int, int>` Get Products Get Products | #
`public` | `getCategories(int $coupon_id): array<int, int>` Get Categories Get Categories | #
`public` | `addHistory(int $coupon_id, int $order_id, int $customer_id, float $amount = 0.00): void` Add History Add History | #
`public` | `deleteHistoriesByOrderId(int $order_id): void` Delete Coupon Histories By Order ID Delete Coupon Histories By Order ID | #
`public` | `getTotalHistories(string $coupon_id): int` Get Total Histories Get Total Histories | #
`public` | `getTotalHistoriesByCustomerId(int $coupon_id, int $customer_id): int` Get Total Histories By Customer ID Get Total Histories By Customer ID | #

Methods inherited from Opencart\System\Engine\Model
`__construct(), __get(), __set(), __isset()`

Properties inherited from Opencart\System\Engine\Model
`$registry`

OpenCart API API documentation generated by ApiGen dev-master