Back to Opencart

Class Opencart\Admin\Model\Catalog\Product

docs/api/Opencart.Admin.Model.Catalog.Product.html

4.1.0.317.7 KB
Original Source

Namespaces

Classes

Class Opencart[Admin](http://localhost\opencart-master/docs/api/namespace-Opencart.Admin.html)\[Model](http://localhost\opencart-master/docs/api/namespace-Opencart.Admin.Model.html)\[Catalog](http://localhost\opencart-master/docs/api/namespace-Opencart.Admin.Model.Catalog.html)\[Product](http://localhost\opencart-master/docs/api/Opencart.Admin.Model.Catalog.Product.html)

| extends | Model |

Class Product

Located at admin\model\catalog\product.php

Methods
`
public

			` | `addProduct(array<string, mixed> $data): int`

Add Product

Add Product

| # | | `

public

			` | `editProduct(int $product_id, array<string, mixed> $data): void`

Edit Product

Edit Product

| # | | `

public

			` | `copyProduct(int $product_id): void`

Copy Product

Copy Product

| # | | `

public

			` | `deleteProduct(int $product_id): void`

Delete Product

Delete Product

| # | | `

public

			` | `addVariant(int $master_id, array<string, mixed> $data): int`

Add Variant

Add Variant

| # | | `

public

			` | `editVariant(int $master_id, int $product_id, array<string, mixed> $data): void`

Edit Variant

Edit Variant

| # | | `

public

			` | `editVariants(int $master_id, array<string, mixed> $data): void`

Edit Variants

Edit Variants

| # | | `

public

			` | `editRating(int $product_id, int $rating): void`

Edit Rating

Edit Rating

| # | | `

public

			` | `editMasterId(int $product_id, int $master_id): void`

Edit Master ID

Edit Master ID

| # | | `

public

			` | `getProduct(int $product_id): array<string, mixed>`

Get Product

Get Product

| # | | `

public

			` | `getProducts(array<string, mixed> $data = []): array<int, array<string, mixed>>`

Get Products

Get Products

| # | | `

public

			` | `getTotalProducts(array<string, mixed> $data = []): int`

Get Total Products

Get Total Products

| # | | `

public

			` | `getTotalProductsByManufacturerId(int $manufacturer_id): int`

Get Total Products By Manufacturer ID

Get Total Products By Manufacturer ID

| # | | `

public

			` | `getTotalProductsByTaxClassId(int $tax_class_id): int`

Get Total Products By Tax Class ID

Get Total Products By Tax Class ID

| # | | `

public

			` | `getTotalProductsByStockStatusId(int $stock_status_id): int`

Get Total Products By Stock Status ID

Get Total Products By Stock Status ID

| # | | `

public

			` | `getTotalProductsByWeightClassId(int $weight_class_id): int`

Get Total Products By Weight Class ID

Get Total Products By Weight Class ID

| # | | `

public

			` | `getTotalProductsByLengthClassId(int $length_class_id): int`

Get Total Products By Length Class ID

Get Total Products By Length Class ID

| # | | `

public

			` | `addDescription(int $product_id, int $language_id, array<string, mixed> $data): void`

Add Description

Add Description

| # | | `

public

			` | `deleteDescriptions(int $product_id): void`

Delete Description

Delete Description

| # | | `

public

			` | `deleteDescriptionsByLanguageId(int $language_id): void`

Delete Descriptions By Language ID

Delete Descriptions By Language ID

| # | | `

public

			` | `getDescriptions(int $product_id): array<int, array<string, mixed>>`

Get Descriptions

Get Descriptions

| # | | `

public

			` | `getDescriptionsByLanguageId(int $language_id): array<int, array<string, string>>`

Get Descriptions By Language ID

Get Descriptions By Language ID

| # | | `

public

			` | `addCategory(int $product_id, int $category_id): void`

Add Category

Add Category

| # | | `

public

			` | `deleteCategories(int $product_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 $product_id): array<int, int>`

Get Categories

Get Categories

| # | | `

public

			` | `addFilter(int $product_id, int $filter_id): void`

Add Filter

Add Filter

| # | | `

public

			` | `deleteFilters(int $product_id): void`

Delete Filters

Delete Filters

| # | | `

public

			` | `getFilters(int $product_id): array<int, int>`

Get Filters

Get Filters

| # | | `

public

			` | `addAttribute(int $product_id, int $attribute_id, int $language_id, array<string, mixed> $data): void`

Add Attribute

Add Attribute

Parameters

| $product_id |

primary key of the attribute record to be fetched

|

| # | | `

public

			` | `deleteAttributes(int $product_id, int $attribute_id = 0): void`

Delete Attributes

Delete Attributes

Parameters

| $product_id |

primary key of the product record to be fetched

|

| # | | `

public

			` | `deleteAttributesByLanguageId(int $language_id): void`

Delete Attributes By Language ID

Delete Attributes By Language ID

| # | | `

public

			` | `getAttributes(int $product_id): array<int, array<string, mixed>>`

Get Attributes

Get Attributes

| # | | `

public

			` | `getAttributesByLanguageId(int $language_id): array<int, array<string, mixed>>`

Get Attributes By Language ID

Get Attributes By Language ID

| # | | `

public

			` | `getTotalAttributesByAttributeId(int $attribute_id): int`

Get Total Products By Attribute ID

Get Total Products By Attribute ID

| # | | `

public

			` | `addOption(int $product_id, array<string, mixed> $data): int`

Add Option

Add Option

Parameters

| $product_id |

primary key of the attribute record to be fetched

|

| # | | `

public

			` | `deleteOptions(int $product_id): void`

Delete Options

Delete Options

Parameters

| $product_id |

primary key of the product record to be fetched

|

| # | | `

public

			` | `getOptions(int $product_id): array<int, array<string, mixed>>`

Get Options

Get Options

| # | | `

public

			` | `getTotalOptionsByOptionId(int $option_id): int`

Get Total Options By Option ID

Get Total Options By Option ID

| # | | `

public

			` | `addOptionValue(int $product_id, int $product_option_id, int $option_id, array<string, mixed> $data): int`

Add Option Value

Add Option Value

Parameters

| $product_id |

primary key of the attribute record to be fetched

|

| # | | `

public

			` | `deleteOptionValues(int $product_id): void`

Delete Option Values

Delete Option Values

Parameters

| $product_id |

primary key of the product record to be fetched

|

| # | | `

public

			` | `getOptionValue(int $product_id, int $product_option_value_id): array<string, mixed>`

Get Option Value

Get Option Value

| # | | `

public

			` | `getOptionValuesByOptionId(int $option_id): array<int, array<string, mixed>>`

Get Option Values By Option ID

Get Option Values By Option ID

| # | | `

public

			` | `getTotalOptionValuesByOptionValueId(int $option_value_id): int`

Get Total Option Values By Option Value ID

Get Total Option Values By Option Value ID

| # | | `

public

			` | `addImage(int $product_id, array<string, mixed> $data): void`

Add Image

Add Image

Parameters

| $product_id |

primary key of the product record to be fetched

|

| # | | `

public

			` | `deleteImages(int $product_id): void`

Delete Images

Delete Images

Parameters

| $product_id |

primary key of the product record to be fetched

|

| # | | `

public

			` | `getImages(int $product_id): array<int, array<string, mixed>>`

Get Images

Get Images

| # | | `

public

			` | `addDiscount(int $product_id, array<string, mixed> $data): void`

Add Discount

Add Discount

Parameters

| $product_id |

primary key of the product record to be fetched

|

| # | | `

public

			` | `deleteDiscounts(int $product_id): void`

Delete Discounts

Delete Discounts

Parameters

| $product_id |

primary key of the product record to be fetched

|

| # | | `

public

			` | `getDiscounts(int $product_id): array<int, array<string, mixed>>`

Get Discounts

Get Discounts

| # | | `

public

			` | `addSpecial(int $product_id, array<string, mixed> $data): void`

Add Special

Add Special

Parameters

| $product_id |

primary key of the product record to be fetched

|

| # | | `

public

			` | `deleteSpecials(int $product_id): void`

Delete Specials

Delete Specials

Parameters

| $product_id |

primary key of the product record to be fetched

|

| # | | `

public

			` | `getSpecials(int $product_id): array<int, array<string, mixed>>`

Get Specials

Get Specials

| # | | `

public

			` | `addReward(int $product_id, int $customer_group_id, array<string, mixed> $data): void`

Add Reward

Add Reward

Parameters

| $product_id |

primary key of the product record to be fetched

|

| # | | `

public

			` | `deleteRewards(int $product_id): void`

Delete Rewards

Delete Rewards

Parameters

| $product_id |

primary key of the product record to be fetched

|

| # | | `

public

			` | `getRewards(int $product_id): array<int, array<string, mixed>>`

Get Rewards

Get Rewards

| # | | `

public

			` | `addDownload(int $product_id, int $download_id): void`

Add Download

Add Download

Parameters

| $product_id |

primary key of the product record to be fetched

|

| # | | `

public

			` | `deleteDownloads(int $product_id): void`

Delete Downloads

Delete Downloads

Parameters

| $product_id |

primary key of the product record to be fetched

|

| # | | `

public

			` | `getDownloads(int $product_id): array<int, int>`

Get Downloads

Get Downloads

| # | | `

public

			` | `getTotalDownloadsByDownloadId(int $download_id): int`

Get Total Downloads By Download ID

Get Total Downloads By Download ID

| # | | `

public

			` | `addStore(int $product_id, int $store_id): void`

Add Store

Add Store

| # | | `

public

			` | `deleteStores(int $product_id): void`

Delete Stores

Delete Stores

| # | | `

public

			` | `getStores(int $product_id): array<int, int>`

Get Stores

Get Stores

| # | | `

public

			` | `addLayout(int $product_id, int $store_id, int $layout_id): void`

Add Layout

Add Layout

| # | | `

public

			` | `deleteLayouts(int $product_id): void`

Delete Layouts

Delete Layouts

| # | | `

public

			` | `deleteLayoutsByLayoutId(int $layout_id): void`

Delete Layouts By Layout ID

Delete Layouts By Layout ID

| # | | `

public

			` | `deleteLayoutsByStoreId(int $store_id): void`

Delete Layouts By Store ID

Delete Layouts By Store ID

| # | | `

public

			` | `getLayouts(int $product_id): array<int, int>`

Get Layouts

Get Layouts

| # | | `

public

			` | `getTotalLayoutsByLayoutId(int $layout_id): int`

Get Total Products By Layout ID

Get Total Products By Layout ID

| # | | `

public

			` | `addRelated(int $product_id, int $related_id): void`

Add Related

Add Related

Parameters

| $product_id |

primary key of the product record to be fetched

|

| # | | `

public

			` | `deleteRelated(int $product_id): void`

Delete Related

Delete Related

Parameters

| $product_id |

primary key of the product record to be fetched

|

| # | | `

public

			` | `getRelated(int $product_id): array<int, int>`

Get Related

Get Related

| # | | `

public

			` | `addSubscription(int $product_id, array<string, mixed> $data): void`

Add Subscription

Add Subscription

| # | | `

public

			` | `deleteSubscriptions(int $product_id): void`

Delete Subscriptions

Delete Subscriptions

| # | | `

public

			` | `getSubscriptions(int $product_id): array<int, array<string, mixed>>`

Get Subscriptions

Get Subscriptions

| # | | `

public

			` | `deleteSubscriptionsBySubscriptionPlanId(int $subscription_plan_id): void`

Delete Subscriptions By Subscription Plan ID

Delete Subscriptions By Subscription Plan ID

| # | | `

public

			` | `getTotalSubscriptionsBySubscriptionPlanId(int $subscription_plan_id): int`

Get Total Subscriptions By Subscription Plan ID

Get Total Subscriptions By Subscription Plan ID

| # | | `

public

			` | `deleteReports(int $product_id): void`

Delete Reports

Delete Reports

| # | | `

public

			` | `getReports(int $product_id, int $start = 0, int $limit = 10): array<int, array<string, mixed>>`

Get Reports

Get Reports

| # | | `

public

			` | `getTotalReports(int $product_id): int`

Get Total Reports

Get Total Reports

| # |

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