magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.54k stars 9.32k forks source link

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

Open annukka-tormala opened 1 day ago

annukka-tormala commented 1 day ago

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: https://github.com/magento/magento2/commit/4bfcc46c542101ecbd96ea1baff5a540b71b17bc#diff-64ae3799eb8d244fd03f20f4ea01674fdab57167f773924837a36871311d2985

Note: similar issue in categories was fixed earlier: https://github.com/magento/magento2/issues/38851#issuecomment-2345340785

Release note

No response

Triage and priority

m2-assistant[bot] commented 1 day ago

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.

hostep commented 1 day ago

No idea if the category tree widget is used by price rules, but if it does, maybe https://github.com/magento/magento2/issues/39008#issuecomment-2427670552 fixes your issue?

annukka-tormala commented 1 day ago

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.

m2-assistant[bot] commented 1 day ago

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: :point_down: