docs/api/Opencart.Admin.Model.Marketing.Coupon.html
| extends | Model |
Class Coupon
Located at admin\model\marketing\coupon.php
| Methods |
|---|
| ` |
public
` | `addCoupon(array<string, mixed> $data): int`
Add Coupon
Add Coupon
| # | | `
public
` | `editCoupon(int $coupon_id, array<string, mixed> $data): void`
Edit Coupon
Edit Coupon
| # | | `
public
` | `deleteCoupon(int $coupon_id): void`
Delete Coupon
Delete Coupon
| # | | `
public
` | `getCoupon(int $coupon_id): array<string, mixed>`
Get Coupon
Get Coupon
| # | | `
public
` | `getCouponByCode(string $code): array<string, mixed>`
Get Coupon By Code
Get Coupon By Code
| # | | `
public
` | `getCoupons(array<string, mixed> $data = []): array<int, array<string, mixed>>`
Get Coupons
Get Coupons
| # | | `
public
` | `addProduct(int $coupon_id, int $product_id): void`
Add Product
Add Product
| # | | `
public
` | `deleteProducts(int $coupon_id): void`
Delete Products
Delete Products
| # | | `
public
` | `deleteProductsByProductId(int $product_id): void`
Delete Products By Product ID
Delete Products By Product ID
| # | | `
public
` | `getProducts(int $coupon_id): array<int, int>`
Get Products
Get Products
| # | | `
public
` | `addCategory(int $coupon_id, int $category_id): void`
Add Category
Add Category
| # | | `
public
` | `deleteCategories(int $coupon_id): void`
Delete Categories
Delete Categories
| # | | `
public
` | `deleteCategoriesByCategoryId(int $category_id): void`
Delete Categories By Category ID
Delete Categories By Category ID
| # | | `
public
` | `getCategories(int $coupon_id): array<int, int>`
Get Categories
Get Categories
| # | | `
public
` | `getTotalCoupons(): int`
Get Total Coupons
Get Total Coupons
| # | | `
public
` | `getHistories(int $coupon_id, int $start = 0, int $limit = 10): array<int, array<string, mixed>>`
Get Histories
Get Histories
| # | | `
public
` | `deleteHistories(int $coupon_id): void`
Delete Coupon Histories
Delete Coupon Histories
| # | | `
public
` | `getTotalHistories(int $coupon_id): int`
Get Total Histories
Get Total Histories
| # |
| 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