diff --git a/Catalog/lib/category/hierarchy.php b/Catalog/lib/category/hierarchy.php index 8e23754f6..3cf6d60c2 100644 --- a/Catalog/lib/category/hierarchy.php +++ b/Catalog/lib/category/hierarchy.php @@ -1,6 +1,16 @@ ($l2 = df_category_level($c)) ? null : ( + $l === $l2 ? $c : df_category($c->getPathIds()[$l]) +);} + /** * 2024-03-10 * 1) @uses \Magento\Catalog\Model\Category::getLevel() can return a string (e.g., "3"). @@ -8,6 +18,7 @@ * 2.2) Level 1: «Default Category» (undeletable, can be renamed). * @used-by cb_category_is_l2() (https://github.com/cabinetsbay/site/issues/98) * @used-by cb_category_is_l3() (https://github.com/cabinetsbay/site/issues/98) + * @used-by df_category_ancestor_at_level() * @used-by \Sharapov\Cabinetsbay\Block\Category\View::getRootCategoryName() (https://github.com/cabinetsbay/site/issues/98) * @used-by \Sharapov\Cabinetsbay\Block\Category\View::level() (https://github.com/cabinetsbay/site/issues/98) * @used-by \Sharapov\Cabinetsbay\Block\Category\View::l3() (https://github.com/cabinetsbay/site/issues/98) diff --git a/Catalog/lib/category/main.php b/Catalog/lib/category/main.php index 3a8c94e82..828249479 100644 --- a/Catalog/lib/category/main.php +++ b/Catalog/lib/category/main.php @@ -10,6 +10,7 @@ /** * 2019-09-08 * @see df_product() + * @used-by df_category_ancestor_at_level() * @used-by df_category_children() * @used-by df_category_children_map() * @used-by \Sharapov\Cabinetsbay\Block\Category\View::l3() (https://github.com/cabinetsbay/site/issues/98) diff --git a/composer.json b/composer.json index 5dec3b9bc..5240dda63 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "mage2pro/core" - ,"version": "10.7.2" + ,"version": "10.7.3" ,"description": "Mage2.PRO core package." ,"type": "magento2-module" ,"homepage": "https://mage2.pro"