Parameters
- name
- The name of the category to locate.
- parentCategoryId
- Optionally specifies the parent category to search within. Pass -1 to search the entire catalog.
Return Value
A category instance if the named category is found. Returns null if the category does not exist.