Plentymarkets interface documentation
Category
Contracts
CategoryBranchMarketplaceRepositoryContract
Repository for CategoryBranchMarketplace
Namespace
Plenty\Modules\Category\Contracts
Methods
public findCategoryBranchMarketplace($branchId, $webstoreId, $marketplaceId, $marketplaceSubId = 0.0):Plenty\Modules\Category\Models\CategoryBranchMarketplace
Return type: CategoryBranchMarketplace
Name |
Type |
Description |
|
||
|
||
|
||
|
CategoryBranchRepositoryContract
Repository Contract for CategoryBranch
Namespace
Plenty\Modules\Category\Contracts
Methods
public find($id):Plenty\Modules\Category\Models\CategoryBranch
Return type: CategoryBranch
Name |
Type |
Description |
|
public get($page = 1, $itemsPerPage = 50, $filters = []):Plenty\Repositories\Contracts\PaginationResponseContract
Return type: PaginationResponseContract
Get category trees
Name |
Type |
Description |
|
||
|
||
|
Filters restrict the list of results. Results can be filtered by the following parameters: 'type' - the category type. Available values: item, container, content, blog |
public clearCriteria():void
Resets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():void
Applies criteria classes to the current repository.
public setFilters($filters = []):void
Sets the filter array.
Name |
Type |
Description |
|
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
CategoryPropertyRepositoryContract
Repository Contract for CategoryProperty
Namespace
Plenty\Modules\Category\Contracts
Methods
public create($data):Plenty\Modules\Category\Models\CategoryProperty
Return type: CategoryProperty
Link a category to an Elmar category
Name |
Type |
Description |
|
public update($categoryId, $marketId, $plentyId, $data):Plenty\Modules\Category\Models\CategoryProperty
Return type: CategoryProperty
Update a link between a category and an Elmar category
Name |
Type |
Description |
|
||
|
||
|
||
|
public delete($categoryId, $marketId, $plentyId):Plenty\Repositories\Models\DeleteResponse
Return type: DeleteResponse
Delete the link between a category and an Elmar category
Name |
Type |
Description |
|
||
|
||
|
public clearCriteria():void
Resets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():void
Applies criteria classes to the current repository.
public setFilters($filters = []):void
Sets the filter array.
Name |
Type |
Description |
|
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
CategoryRepositoryContract
Repository for categories
Namespace
Plenty\Modules\Category\Contracts
Methods
public get($categoryId, $lang = "de", $webstoreId = null):Plenty\Modules\Category\Models\Category
Return type: Category
Returns one category by id.
Name |
Type |
Description |
|
The id of the category. |
|
|
Optional language of details. |
|
|
Optional webstore id of details. |
public getLinklistTree($type = "all", $lang = "de", $clientId = null, $maxLevel = 6, $customerClassId):array
Returns all linklist categories as tree.
Name |
Type |
Description |
|
'all','item','container','content' or 'blog' |
|
|
Optional language of details. |
|
|
The unique ID of the client (store) |
|
|
The deepest category level to load |
|
|
The customer class id |
public getArrayTree($type = "all", $lang = "de", $clientId = null, $maxLevel = 6, $customerClassId, $filter = null):array
Name |
Type |
Description |
|
'all','item','container','content' or 'blog' |
|
|
Optional language of details. |
|
|
The unique ID of the client (store) |
|
|
The deepest category level to load |
|
|
The customer class id |
|
|
public findCategoryByUrl($level1, $level2 = null, $level3 = null, $level4 = null, $level5 = null, $level6 = null, $webstoreId = null, $lang = null):Plenty\Modules\Category\Models\Category
Return type: Category
Get the category by url.
Name |
Type |
Description |
|
First level of the url. |
|
|
Second level of the url. |
|
|
Third level of the url. |
|
|
Fourth level of the url. |
|
|
Fifth level of the url. |
|
|
Sixth level of the url. |
|
|
Id of current webstore. |
|
|
Language |
public buildCache($type = "all", $lang = "de", $clientId, $customerClassId):void
Rebuild the category tree cache
Name |
Type |
Description |
|
'all','item','container','content' or 'blog' |
|
|
Optional language of details. |
|
|
The unique ID of the client (store) |
|
|
The customer class id |
public getLinklistList($type = "all", $lang = "de", $clientId = null, $maxLevel = 6):array
Returns all linklist categories as list.
Name |
Type |
Description |
|
'all','item','container','content' or 'blog' |
|
|
Optional language of details. |
|
|
The unique ID of the client (store) |
|
|
The deepest category level to load |
public hasChildren($categoryId, $onlySiteMapped = false, $onlyLinkListed = false):bool
Returns true if category has children.
Name |
Type |
Description |
|
The id of the category. |
|
|
Determines if the result has only sitemaps or all visible categories. |
|
|
Determines if the result has only linklists or all visible categories. |
public getChildren($categoryId, $lang = "de"):array
Returns children of the category.
Name |
Type |
Description |
|
The id of the category. |
|
|
Optional language of details. |
public getUrl($categoryId, $lang = "de", $onlySitemaps = false, $webstoreId = null):string
Retrieves the url for a category.
Name |
Type |
Description |
|
The id of the category. |
|
|
Optional language of details. |
|
|
Whether or not to only include categories with 'sitemaps' = 'Y'. Default false. |
|
|
webstoreId of details |
public search($categoryId = null, $page, $itemsPerPage = 50, $with = [], $filters = []):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
Search for categories
Name |
Type |
Description |
|
The id of the category. |
|
|
The requested page. |
|
|
Number of items per page. |
|
|
The relations to be loaded. |
|
|
Filters restrict the list of results. Results can be filtered by the following parameters: 'type','lang','parentId', 'plentyId', 'linklist' |
public createCategories($data):array
Creates new categories, including CategoryDetails. At least one CategoryDetails object for the default language is required. The data fields 'plentyId','lang' and 'name' are required. Client objects can also be specified to activate visibility for a client.
Name |
Type |
Description |
|
The data fields for the new Categories, including the details data fields |
public updateCategories($data):array
Update categories, including optional CategoryDetails. The data fields 'plentyId','lang' are required for the CategoryDetails object. Client objects can also be specified to change visibility for a client.
Name |
Type |
Description |
|
The data fields for the Categories, including the details and client data fields |
public createCategory($data):Plenty\Modules\Category\Models\Category
Return type: Category
Creates a new category
Name |
Type |
Description |
|
public delete($categoryId):Plenty\Repositories\Models\DeleteResponse
Return type: DeleteResponse
Deletes a category. The ID of the category must be specified.
Name |
Type |
Description |
|
public deleteCategoryDetails($categoryId, $data):Plenty\Repositories\Models\DeleteResponse
Return type: DeleteResponse
Delete the category details for the languages specified.
Name |
Type |
Description |
|
||
|
public deleteCategoryClients($categoryId, $data):Plenty\Repositories\Models\DeleteResponse
Return type: DeleteResponse
Deactivate availability for clients
Name |
Type |
Description |
|
||
|
public clearCriteria():void
Resets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():void
Applies criteria classes to the current repository.
public setFilters($filters = []):void
Sets the filter array.
Name |
Type |
Description |
|
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
CategoryTemplateRepositoryContract
Repository for category templates
Namespace
Plenty\Modules\Category\Contracts
Methods
public find($params):Plenty\Modules\Category\Models\CategoryTemplate
Return type: CategoryTemplate
Name |
Type |
Description |
|
public put($data):Plenty\Modules\Category\Models\CategoryTemplate
Return type: CategoryTemplate
Name |
Type |
Description |
|
public delete($data):Plenty\Modules\Category\Models\CategoryTemplate
Return type: CategoryTemplate
Name |
Type |
Description |
|
Models
Category
Category
Namespace
Plenty\Modules\Category\Models
Name | Type | Description |
---|---|---|
id |
The unique ID of the category |
|
parentCategoryId |
The ID of the category’s parent category. Value is <strong>null</strong> if category level is 1. |
|
level |
The category level of this category. This information is used for the sitemap. |
|
type |
The category type of the category |
|
linklist |
Flag that indicates if the category will be displayed in the online store’s navigation. |
|
right |
Flag that indicates who can see this category. <ul><li>all = Category is visible to all visitors of the online store.</li><li>customer = Category and all of its subcategories are visible to visitors of the online store that have logged in only. Visitors that are not logged in are redirected to the login page.</li></ul> |
|
sitemap |
Flag that indicates if the category will be included in the sitemap. |
|
updatedAt |
The updated at timestamp of the category. |
|
clients |
Collection of the clients (stores) that belong to this category |
|
details |
Collection of the category details that belong to this category |
|
elmarCategories |
The linked elmar |
Methods
public toArray()
Returns this model as an array.
CategoryBranch
Category Branch
Namespace
Plenty\Modules\Category\Models
Name | Type | Description |
---|---|---|
categoryId |
The ID of the category |
|
category1Id |
The ID of the category tree’s 1st level. If 1st value is identical to category ID, category is of this level. |
|
category2Id |
The ID of the category tree’s 2nd level. If 2nd level value is identical to category ID, category is of this level. If 2nd level value is <strong>null</strong>, category is of a higher level. |
|
category3Id |
The ID of the category tree’s 3rd level. If 3rd level value is identical to category ID, category is of this level. If 2nd level value is <strong>null</strong>, category is of a higher level. |
|
category4Id |
The ID of the category tree’s 4th level. If 4th level value is identical to category ID, category is of this level. If 2nd level value is <strong>null</strong>, category is of a higher level. |
|
category5Id |
The ID of the category tree’s 5th level. If 5th level value is identical to category ID, category is of this level. If 2nd level value is <strong>null</strong>, category is of a higher level. |
|
category6Id |
The ID of the category tree’s 6th level. If 6th level value is identical to category ID, category is of this level. If 2nd level value is <strong>null</strong>, category is of a higher level. |
Methods
public toArray()
Returns this model as an array.
CategoryBranchMarketplace
The CategoryBranchMarketplace model
Namespace
Plenty\Modules\Category\Models
Name | Type | Description |
---|---|---|
plenty_category_branch_marketplace_branch_id |
||
plenty_category_branch_marketplace_webstore_id |
||
plenty_category_branch_marketplace_marketplace_id |
||
plenty_category_branch_marketplace_marketplace_sub_id |
||
plenty_category_branch_marketplace_delimiter |
||
plenty_category_branch_marketplace_value1 |
||
plenty_category_branch_marketplace_value2 |
||
plenty_category_branch_marketplace_last_update |
||
branch |
Methods
public toArray()
Returns this model as an array.
CategoryClient
The Category Client
Namespace
Plenty\Modules\Category\Models
Name | Type | Description |
---|---|---|
plentyId |
The unique plenty ID of the client (store) in which the category is visible. Several IDs can be separated by commas. If a subcategory is linked to a client, its parent categories will be linked to this client as well. |
Methods
public toArray()
Returns this model as an array.
CategoryDetails
CategoryDetails
Namespace
Plenty\Modules\Category\Models
Name | Type | Description |
---|---|---|
categoryId |
The unique ID of the category these category details belong to |
|
plentyId |
The unique plenty ID of the client (store) in which the category is visible. If a subcategory is linked to a client, its parent categories will be linked to this client as well. |
|
lang |
The <a href="https://developers.plentymarkets.com/rest-doc/introduction#languages" target="_blank">language</a> of the category |
|
name |
The name of the category. The same category name can be used more than once in different categories or on different category levels. However, category names must be unique within the same category or level. |
|
description |
The category text. The description is inserted into the online store using template variables. |
|
description2 |
The category text 2. The description 2 is inserted into the online store using template variables. |
|
shortDescription |
The short description of the category. The short description can be inserted into the store’s design using template variables. |
|
metaKeywords |
HTML meta keywords to tag the category for search engines. More than one keyword can be separated by commas. |
|
metaDescription |
The meta description of the category. This description is analysed by search engines and displayed in search results. This text should be treated as an advertising text to maximise click-through from search engine result pages. Current recommended limit is 156 characters. |
|
nameUrl |
The category name to be used for the category’s URL. The same URL name can be used more than once in different categories or on different category levels. However, URL names must be unique within the same category or level. The URL name should not be changed once the category is indexed by search engines. If no URL name is specified, the name will automatically be used as the URL name when the category is created.<br />Important: Name should contain ASCII code only and no special characters. The following character strings may not be used as prefixes to URL names: a-, b-, c-, f-, fa-, p-, t-. These prefixes will be removed automatically. For instance, a-class will be changed to class automatically. However, the URL name aclass can be used for a category named A-class. |
|
metaTitle |
This will be displayed as the title of a tab in the web browser and as a search result in search engines. If this is left blank, the category name will be used as the title. Current recommended limit is 50 characters. Longer titles will be cut off. |
|
image |
The ID to the image1 of the category. |
|
image2 |
The ID to the image2 of the category. |
|
imagePath |
The path to the image1 of the category. |
|
image2Path |
The path to the image2 of the category. |
|
previewUrl |
The category’s URL. |
|
position |
The position of the category within a category level. |
|
itemListView |
The template the category is linked to for the category overview. The template determines what the category overview will look like for this category. This option is available for categories of the type <strong>Item</strong> only. Possible values: ItemViewCategoriesList, ItemViewCategoriesList2 to ItemViewCategoriesList10. |
|
singleItemView |
The template the category is linked to for the single item view. The template determines the appearance of the single item design for this category. This option is available for categories of the type <strong>Item</strong> only. Possible values: ItemViewSingleItem, ItemViewSingleItem2 to ItemViewSingleItem5. |
|
pageView |
||
fulltext |
Flag that indicates if the complete category text, i.e. the complete description, will be searched.<ul><li>Y = Complete text will be searched.</li><li>N = Text will not be searched completely.</li></ul> |
|
metaRobots |
Values from the meta element Robots are analyzed by Web crawlers. These values tell the crawler what it should do with the page and with the links on the page.<ul><li>all = Include this category in the search engine index and follow the links on the page.</li><li>index = Include in the search engine index.</li><li>nofollow = Do not follow the links on the page.</li><li>noindex = Do not include in the search engine index.</li><li>nofollow, noindex = Do not follow the links and do not include the category in the search engine index.</li></ul> |
|
canonicalLink |
The URL of any category that contains the same content. This will avoid duplicate content. |
|
updatedAt |
The time the category details were last updated |
|
updatedBy |
The user who last updated the category details |
|
category |
The category these category details are associated with. |
Methods
public toArray()
Returns this model as an array.
CategoryItemCount
CategoryItemCount
Namespace
Plenty\Modules\Category\Models
Name | Type | Description |
---|---|---|
categoryId |
The unique ID of the category |
|
webstoreId |
The ID of the client (store) |
|
count |
The count of items |
|
createdAt |
The date that the category item count was created. |
|
updatedAt |
The date that the category item count was updated last. |
|
variationCount |
The count of variations |
|
customerClassId |
The ID of the customer class |
Methods
public toArray()
Returns this model as an array.
CategoryProperty
The Category Property
Namespace
Plenty\Modules\Category\Models
Name | Type | Description |
---|---|---|
categoryId |
The unique ID of the category |
|
marketId |
The unique ID of the referrer |
|
plentyId |
The unique plenty ID of the client (store) |
|
value |
The category of the referrer |
Methods
public toArray()
Returns this model as an array.
CategoryTemplate
Category Template
Namespace
Plenty\Modules\Category\Models
Name | Type | Description |
---|---|---|
categoryId |
The unique ID of the category |
|
plentyId |
The unique plenty ID of the client (store) |
|
lang |
The language of the template |
|
content |
The content of the template |
Methods
public toArray()
Returns this model as an array.