Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Include child item group products in Item Group Page & cleanup #30091

Merged
merged 5 commits into from
Mar 9, 2022

Conversation

marination
Copy link
Collaborator

@marination marination commented Mar 7, 2022

Documentation: https://docs.erpnext.com/docs/v13/user/manual/en/e_commerce/item_group_wise_product_listing

Case:

  • Item Group Seating as child item groups -> Dining Chairs and Lounge Chairs
  • When the Seating Item Group page is visited on the Portal, only Items with Item Group = Seating or having Seating in Website Item Groups, are pulled.
  • The user wants Dining Chairs and Lounge Chairs and Lounge Chairs to be pulled on the Seating page too.
  • This can be driven via Website Item Groups but it gets too tedious to set Website Item Groups for so many sub groups.

Screenshot 2022-03-07 at 1 14 15 PM

Feature:

  • Added a checkbox Include Descendants in the Item Group. Now users can check this for the Item Groups they want.
    Screenshot 2022-03-07 at 1 19 35 PM
  • This will pull in Items belonging to child Item groups as well, with filters applicable on the same
  • This PR also cleans up the Website section in Item Group.
  • Item Group filters will now be build separately in query.py instead of api.pi earlier. api.py must only pass data not construct data based on business logic.

Screenshot 2022-03-07 at 1 14 32 PM

2022-03-07 13 15 51

- Added 'Include descendants' checkbox, which will pull child item group products too
- Build item group filters in query engine file
- Include logic in filter engine
- Clean up Website section of Item Group page (UX)
- Add util to fetch child item groups including self
@github-actions github-actions bot added ecommerce needs-tests This PR needs automated unit-tests. labels Mar 7, 2022
@marination marination removed the needs-tests This PR needs automated unit-tests. label Mar 9, 2022
@marination marination added the CI-failing Unit tests or patch tests are failing. label Mar 9, 2022
- Also made include_descendants field's visibility dependant on show_in_website
@marination marination marked this pull request as ready for review March 9, 2022 10:03
@marination marination removed the CI-failing Unit tests or patch tests are failing. label Mar 9, 2022
@marination
Copy link
Collaborator Author

Unrelated failures

@marination marination merged commit 2661cb2 into frappe:develop Mar 9, 2022
marination added a commit that referenced this pull request Mar 9, 2022
…-30091

feat: Include child item group products in Item Group Page & cleanup (backport #30091)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant