Category
Category represents an object of basic category information.
List of available attributes
- name
- parent
- slug
- products
- subcategories
- ancestors
- id
- depth
- parent_id
- created_at
- updated_at
- root?
- child?
name
Returns translated name based on locale
parent
Returns parent category
slug
Returns category slug
products
Returns products assigned to category
subcategories
Returns the subcategories
ancestors
Returns the ancestor categories as an array
id
Returns the category ID
depth
Level where category is in category tree
parent_id
Returns the parent category ID
created_at
Returns a date when this category was first created
updated_at
Returns a date when this category was last updated
root?
Returns true for first level category
child?
Returns true if category is not root