Repository for CategoryBranchMarketplace
Plenty\Modules\Category\Contracts
public findCategoryBranchMarketplace(int $branchId, int $webstoreId, int $marketplaceId, float $marketplaceSubId = 0.0):CategoryBranchMarketplace
int | $branchId | |
int | $webstoreId | |
int | $marketplaceId | |
float | $marketplaceSubId |
Repository Contract for CategoryBranch
Plenty\Modules\Category\Contracts
public find(int $id):CategoryBranch
int | $id |
public get(int $page = 1, int $itemsPerPage = 50, array $filters = []):PaginationResponseContract
Get category trees
int | $page | |
int | $itemsPerPage | |
array | $filters | 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(array $filters = []):void
Sets the filter array.
array | $filters |
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.
Repository Contract for CategoryProperty
Plenty\Modules\Category\Contracts
public create(array $data):CategoryProperty
Link a category to an Elmar category
array | $data |
public update(int $categoryId, float $marketId, int $plentyId, array $data):CategoryProperty
Update a link between a category and an Elmar category
int | $categoryId | |
float | $marketId | |
int | $plentyId | |
array | $data |
public delete(int $categoryId, float $marketId, int $plentyId):DeleteResponse
Delete the link between a category and an Elmar category
int | $categoryId | |
float | $marketId | |
int | $plentyId |
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(array $filters = []):void
Sets the filter array.
array | $filters |
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.
Repository for categories
Plenty\Modules\Category\Contracts
public get(int $categoryId, string $lang = "de", int $webstoreId = null):Category
Returns one category by id.
int | $categoryId | The id of the category. |
string | $lang | Optional language of details. |
int | $webstoreId | Optional webstore id of details. |
public getLinklistTree(string $type = "all", string $lang = "de", int $clientId = null, int $maxLevel = 6, int $customerClassId):array
Returns all linklist categories as tree.
string | $type | 'all','item','container','content' or 'blog' |
string | $lang | Optional language of details. |
int | $clientId | The unique ID of the client (store) |
int | $maxLevel | The deepest category level to load |
int | $customerClassId | The customer class id |
public getArrayTree(string $type = "all", string $lang = "de", int $clientId = null, int $maxLevel = 6, int $customerClassId, callable $filter = null):array
string | $type | 'all','item','container','content' or 'blog' |
string | $lang | Optional language of details. |
int | $clientId | The unique ID of the client (store) |
int | $maxLevel | The deepest category level to load |
int | $customerClassId | The customer class id |
callable | $filter |
public findCategoryByUrl(string $level1, string $level2 = null, string $level3 = null, string $level4 = null, string $level5 = null, string $level6 = null, int $webstoreId = null, string $lang = null):Category
Get the category by url.
string | $level1 | First level of the url. |
string | $level2 | Second level of the url. |
string | $level3 | Third level of the url. |
string | $level4 | Fourth level of the url. |
string | $level5 | Fifth level of the url. |
string | $level6 | Sixth level of the url. |
int | $webstoreId | Id of current webstore. |
string | $lang | Language |
public buildCache(string $type = "all", string $lang = "de", int $clientId, int $customerClassId):void
Rebuild the category tree cache
string | $type | 'all','item','container','content' or 'blog' |
string | $lang | Optional language of details. |
int | $clientId | The unique ID of the client (store) |
int | $customerClassId | The customer class id |
public getLinklistList(string $type = "all", string $lang = "de", int $clientId = null, int $maxLevel = 6):array
Returns all linklist categories as list.
string | $type | 'all','item','container','content' or 'blog' |
string | $lang | Optional language of details. |
int | $clientId | The unique ID of the client (store) |
int | $maxLevel | The deepest category level to load |
public hasChildren(int $categoryId, bool $onlySiteMapped = false, bool $onlyLinkListed = false):bool
Returns true if category has children.
int | $categoryId | The id of the category. |
bool | $onlySiteMapped | Determines if the result has only sitemaps or all visible categories. |
bool | $onlyLinkListed | Determines if the result has only linklists or all visible categories. |
public getChildren(int $categoryId, string $lang = "de"):array
Returns children of the category.
int | $categoryId | The id of the category. |
string | $lang | Optional language of details. |
public getUrl(int $categoryId, string $lang = "de", bool $onlySitemaps = false, bool $webstoreId = null):string
Retrieves the url for a category.
int | $categoryId | The id of the category. |
string | $lang | Optional language of details. |
bool | $onlySitemaps | Whether or not to only include categories with 'sitemaps' = 'Y'. Default false. |
bool | $webstoreId | webstoreId of details |
public search(int $categoryId = null, int $page, int $itemsPerPage = 50, array $with = [], array $filters = []):PaginatedResult
Search for categories
int | $categoryId | The id of the category. |
int | $page | The requested page. |
int | $itemsPerPage | Number of items per page. |
array | $with | The relations to be loaded. |
array | $filters | Filters restrict the list of results. Results can be filtered by the following parameters: 'type','lang','parentId', 'plentyId', 'linklist' |
public createCategories(array $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.
array | $data | The data fields for the new Categories, including the details data fields |
public updateCategories(array $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.
array | $data | The data fields for the Categories, including the details and client data fields |
public createCategory(array $data):Category
Creates a new category
array | $data |
public delete(int $categoryId):DeleteResponse
Deletes a category. The ID of the category must be specified.
int | $categoryId |
public deleteCategoryDetails(int $categoryId, array $data):DeleteResponse
Delete the category details for the languages specified.
int | $categoryId | |
array | $data |
public deleteCategoryClients(int $categoryId, array $data):DeleteResponse
Deactivate availability for clients
int | $categoryId | |
array | $data |
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(array $filters = []):void
Sets the filter array.
array | $filters |
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.
Repository for category templates
Plenty\Modules\Category\Contracts
public find(array $params):CategoryTemplate
array | $params |
public put(array $data):CategoryTemplate
array | $data |
public delete(array $data):CategoryTemplate
array | $data |
Category
Plenty\Modules\Category\Models
Type | Name | Description |
---|---|---|
int | id | The unique ID of the category |
int | parentCategoryId | The ID of the category's parent category. Value is null if category level is 1. |
int | level | The category level of this category. This information is used for the sitemap. |
string | type | The category type of the category |
string | linklist | Flag that indicates if the category will be displayed in the online store's navigation. |
string | right | Flag that indicates who can see this category.
|
string | sitemap | Flag that indicates if the category will be included in the sitemap. |
string | updatedAt | The updated at timestamp of the category. |
array | clients | Collection of the clients (stores) that belong to this category |
array | details | Collection of the category details that belong to this category |
array | elmarCategories | The linked elmar |
public toArray()
Returns this model as an array.
Category Branch
Plenty\Modules\Category\Models
Type | Name | Description |
---|---|---|
int | categoryId | The ID of the category |
int | category1Id | The ID of the category tree's 1st level. If 1st value is identical to category ID, category is of this level. |
int | 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 null, category is of a higher level. |
int | 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 null, category is of a higher level. |
int | 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 null, category is of a higher level. |
int | 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 null, category is of a higher level. |
int | 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 null, category is of a higher level. |
public toArray()
Returns this model as an array.
The CategoryBranchMarketplace model
Plenty\Modules\Category\Models
Type | Name | Description |
---|---|---|
int | plenty_category_branch_marketplace_branch_id | |
int | plenty_category_branch_marketplace_webstore_id | |
float | plenty_category_branch_marketplace_marketplace_id | |
float | plenty_category_branch_marketplace_marketplace_sub_id | |
string | plenty_category_branch_marketplace_delimiter | |
string | plenty_category_branch_marketplace_value1 | |
string | plenty_category_branch_marketplace_value2 | |
string | plenty_category_branch_marketplace_last_update | |
CategoryBranch | branch |
public toArray()
Returns this model as an array.
The Category Client
Plenty\Modules\Category\Models
Type | Name | Description |
---|---|---|
int | 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. |
public toArray()
Returns this model as an array.
CategoryDetails
Plenty\Modules\Category\Models
Type | Name | Description |
---|---|---|
int | categoryId | The unique ID of the category these category details belong to |
int | 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. |
string | lang | The language of the category |
string | 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. |
string | description | The category text. The description is inserted into the online store using template variables. |
string | description2 | The category text 2. The description 2 is inserted into the online store using template variables. |
string | shortDescription | The short description of the category. The short description can be inserted into the store's design using template variables. |
string | metaKeywords | HTML meta keywords to tag the category for search engines. More than one keyword can be separated by commas. |
string | 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. |
string | 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. 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. |
string | 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. |
string | image | The ID to the image1 of the category. |
string | image2 | The ID to the image2 of the category. |
string | imagePath | The path to the image1 of the category. |
string | image2Path | The path to the image2 of the category. |
string | previewUrl | The category's URL. |
int | position | The position of the category within a category level. |
string | 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 Item only. Possible values: ItemViewCategoriesList, ItemViewCategoriesList2 to ItemViewCategoriesList10. |
string | 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 Item only. Possible values: ItemViewSingleItem, ItemViewSingleItem2 to ItemViewSingleItem5. |
string | pageView | |
bool | fulltext | Flag that indicates if the complete category text, i.e. the complete description, will be searched.
|
string | 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.
|
string | canonicalLink | The URL of any category that contains the same content. This will avoid duplicate content. |
string | updatedAt | The time the category details were last updated |
string | updatedBy | The user who last updated the category details |
Category | category | The category these category details are associated with. |
public toArray()
Returns this model as an array.
CategoryItemCount
Plenty\Modules\Category\Models
Type | Name | Description |
---|---|---|
int | categoryId | The unique ID of the category |
int | webstoreId | The ID of the client (store) |
int | count | The count of items |
string | createdAt | The date that the category item count was created. |
string | updatedAt | The date that the category item count was updated last. |
int | variationCount | The count of variations |
int | customerClassId | The ID of the customer class |
public toArray()
Returns this model as an array.
The Category Property
Plenty\Modules\Category\Models
Type | Name | Description |
---|---|---|
int | categoryId | The unique ID of the category |
float | marketId | The unique ID of the referrer |
int | plentyId | The unique plenty ID of the client (store) |
string | value | The category of the referrer |
public toArray()
Returns this model as an array.
Category Template
Plenty\Modules\Category\Models
Type | Name | Description |
---|---|---|
int | categoryId | The unique ID of the category |
int | plentyId | The unique plenty ID of the client (store) |
string | lang | The language of the template |
string | content | The content of the template |
public toArray()
Returns this model as an array.