magento / magento/community-features
Extend CategoryFilterInput with url_path field
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 46
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
Description (*)
The categoryList field introduced in 2.3.4 should be extended to support the fetching of categories by url_path. Typically a website would indeed have the url_path of the category in the URL, so it would be straightforward to be able to use this field to fetch the corresponding Magento category.
Expected behavior (*)
CategoryFilterInput has an extra url_path field of type FilterEqualTypeInput.
Benefits
This would allow websites using URLs that contain category url paths to easily lookup categories. For example:
https://myshop.com/men/tops --> lookup category with url_path = /men/tops
Currently one has to lookup the category with url_key = tops and then filter the returned categories with url_path = /men/tops to make sure that all other tops categories are ignored (for example, /women/tops).
The alternative is to use urlResolver but this requires two queries to fetch the category.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the CategoryFilterInput definition and the categoryList query introduced in 2.3.4; compare them with the urlResolver behavior described in the issue. Done means CategoryFilterInput accepts a url_path FilterEqualTypeInput and categoryList can return the category matching a full path such as /men/tops.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100