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

Category tree in Cart Price Rules is not rendered correctly #39312

Open
1 of 5 tasks
annukka-tormala opened this issue Oct 30, 2024 · 10 comments
Open
1 of 5 tasks

Category tree in Cart Price Rules is not rendered correctly #39312

annukka-tormala opened this issue Oct 30, 2024 · 10 comments
Assignees
Labels
Issue: needs update Additional information is require, waiting for response Reported on 2.4.7-p1 Indicates original Magento version for the Issue report.

Comments

@annukka-tormala
Copy link

Preconditions and environment

Magento version 2.4.7-p1

Steps to reproduce

  1. Navigate to Cart Price Rules from admin (Marketing > Promotions > Cart Price Rules > [some rule] )
  2. Go to Actions tab and apply category rule (Actions > Apply the rule only to cart items matching the following conditions > Select category)

Expected result

All the subcategories should be visible in the category tree.

Actual result

Only categories 3 levels deep are rendered.

Screenshot from category tree from Cart Price Rules condition:
brokentree

Screenshot from the category tree from Catalog>Inventory>Categories from admin:
As you can see, all the subcategories are rendered here, but not in the Cart Price Rules condition category tree
workingtree

Additional information

This seems to have happened in 2.4.7 when the extjs library was replaced with the latest version of jsTree. Related commit: 4bfcc46#diff-64ae3799eb8d244fd03f20f4ea01674fdab57167f773924837a36871311d2985

Note: similar issue in categories was fixed earlier: #38851 (comment)

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Copy link

m2-assistant bot commented Oct 30, 2024

Hi @annukka-tormala. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce.


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

@hostep
Copy link
Contributor

hostep commented Oct 30, 2024

No idea if the category tree widget is used by price rules, but if it does, maybe #39008 (comment) fixes your issue?

@annukka-tormala
Copy link
Author

No idea if the category tree widget is used by price rules, but if it does, maybe #39008 (comment) fixes your issue?

Unfortunately no, that widget category tree template is not used by the price rules.

@engcom-Bravo engcom-Bravo self-assigned this Oct 30, 2024
Copy link

m2-assistant bot commented Oct 30, 2024

Hi @engcom-Bravo. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Bravo engcom-Bravo added the Reported on 2.4.7-p1 Indicates original Magento version for the Issue report. label Oct 30, 2024
@engcom-Bravo
Copy link
Contributor

Hi @annukka-tormala,

Thanks for your reporting and collaboration.

We have verified the issue in Latest 2.4-develop instance and the issue is not reproducible.Kindly refer the screenshots.

Steps to reproduce

  • Navigate to Cart Price Rules from admin (Marketing > Promotions > Cart Price Rules > [some rule] )
  • Go to Actions tab and apply category rule (Actions > Apply the rule only to cart items matching the following conditions > Select category)
Screenshot 2024-11-04 at 10 18 18 Screenshot 2024-11-04 at 10 19 23

All the subcategories are visible in category tree.

Thanks.

@engcom-Bravo engcom-Bravo added the Issue: needs update Additional information is require, waiting for response label Nov 4, 2024
@annukka-tormala
Copy link
Author

@magento give me 2.4.7 instance

@annukka-tormala
Copy link
Author

Hi, I was able to reproduce this with categories that have products in it. In your screenshot the sub-categories are empty. With sub-categories being empty, the category tree is rendered correctly.

categorytreeincategory
categorytreeintrules

As you can see, the category Women>Tops>Jackets is still missing the two subcategories

@engcom-Bravo
Copy link
Contributor

Hi @annukka-tormala,

Thanks for your update.

We have verified the issue in Latest 2.4-develop instance and the issue is not reproducible.Kindly refer the screenshots.

Screenshot 2024-11-05 at 09 28 09 Screenshot 2024-11-05 at 09 29 27

The sub-categories with products are rendered correctly.

Kindly recheck the issue in Latest 2.4-develop instance and elaborate the steps to reproduce if the issue is still reproducible.

Thanks.

@annukka-tormala
Copy link
Author

@magento give me 2.4-develop instance

@annukka-tormala
Copy link
Author

Hi, the issue seems to happen when the category tree is more complex. So could you add more sub-categories on your test categories (and products into it)?. Tested this again and was able to reproduce this with the following category tree:
categorytreeincategory

The same tree in Cart Price Rules ("Deep Test" category is missing):
brokentree

Here is an another example of a simpler category tree where the issue doesn't happen (in Cart Price Rules):
simple

Tested with Magento version 2.4.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: needs update Additional information is require, waiting for response Reported on 2.4.7-p1 Indicates original Magento version for the Issue report.
Projects
Development

No branches or pull requests

3 participants