magento / magento/community-features

Extend CategoryFilterInput with url_path field

Open
#241 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Priority: P3
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.