Categories are not in order same as in Admin panel Magento 2 Planned maintenance scheduled...

Do wooden building fires get hotter than 600°C?

What is the longest distance a player character can jump in one leap?

Can a new player join a group only when a new campaign starts?

What does the "x" in "x86" represent?

Is it common practice to audition new musicians one-on-one before rehearsing with the entire band?

How do I make this wiring inside cabinet safer? (Pic)

Using et al. for a last / senior author rather than for a first author

Why are both D and D# fitting into my E minor key?

Is "Reachable Object" really an NP-complete problem?

Should I use a zero-interest credit card for a large one-time purchase?

Can an alien society believe that their star system is the universe?

Is CEO the profession with the most psychopaths?

Wu formula for manifolds with boundary

Closed form of recurrent arithmetic series summation

Is this homebrew Lady of Pain warlock patron balanced?

Generate an RGB colour grid

If a contract sometimes uses the wrong name, is it still valid?

How to Make a Beautiful Stacked 3D Plot

Fundamental Solution of the Pell Equation

How to compare two different files line by line in unix?

Significance of Cersei's obsession with elephants?

Dating a Former Employee

How to answer "Have you ever been terminated?"

Where are Serre’s lectures at Collège de France to be found?



Categories are not in order same as in Admin panel Magento 2



Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Admin Panel order grid: Multiple sort conditions?Programmatically assign a product's categories _AND_ sort order/positionCategory Sorting: Add custom “Available Product Listing Sort by” option in admin panelCategory Sorting Product list: How to take off position from attributes?Magento 2 - Admin Layout XML - Update Template and change block type for specific categoryChanging the layout of the product category page by editing an XML fileM2: After updating products from code, thumbnails are not showing in catalog and on backendMagento 2: Sort multilevel category collection by both level and positionMagento 2: How to change the position/order of a sub-category?Magento 2 : How to show sub categories on Static block?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I am listing children categories of specific category using below code:



$categoryFactory = $this->_categoryFactory->create();
$category = $categoryFactory->loadByAttribute('url_key', 'shop');
$childrenCategories = $category->getAllChildren(true);


This methods does not return categories in same order as in Admin panel.



I have changed position of categories in Admin panel by drag and drop then i cleared cache and reindexed too.



Any idea what is wrong here?









share





























    0















    I am listing children categories of specific category using below code:



    $categoryFactory = $this->_categoryFactory->create();
    $category = $categoryFactory->loadByAttribute('url_key', 'shop');
    $childrenCategories = $category->getAllChildren(true);


    This methods does not return categories in same order as in Admin panel.



    I have changed position of categories in Admin panel by drag and drop then i cleared cache and reindexed too.



    Any idea what is wrong here?









    share

























      0












      0








      0








      I am listing children categories of specific category using below code:



      $categoryFactory = $this->_categoryFactory->create();
      $category = $categoryFactory->loadByAttribute('url_key', 'shop');
      $childrenCategories = $category->getAllChildren(true);


      This methods does not return categories in same order as in Admin panel.



      I have changed position of categories in Admin panel by drag and drop then i cleared cache and reindexed too.



      Any idea what is wrong here?









      share














      I am listing children categories of specific category using below code:



      $categoryFactory = $this->_categoryFactory->create();
      $category = $categoryFactory->loadByAttribute('url_key', 'shop');
      $childrenCategories = $category->getAllChildren(true);


      This methods does not return categories in same order as in Admin panel.



      I have changed position of categories in Admin panel by drag and drop then i cleared cache and reindexed too.



      Any idea what is wrong here?







      magento2 sorting sub-categories





      share












      share










      share



      share










      asked 3 mins ago









      KhushbuKhushbu

      9010




      9010






















          1 Answer
          1






          active

          oldest

          votes


















          0














          I suggest to check with your database category tabel, so you can easily debug where is the issue.





          share
























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "479"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f270563%2fcategories-are-not-in-order-same-as-in-admin-panel-magento-2%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            I suggest to check with your database category tabel, so you can easily debug where is the issue.





            share




























              0














              I suggest to check with your database category tabel, so you can easily debug where is the issue.





              share


























                0












                0








                0







                I suggest to check with your database category tabel, so you can easily debug where is the issue.





                share













                I suggest to check with your database category tabel, so you can easily debug where is the issue.






                share











                share


                share










                answered 42 secs ago









                Anas MansuriAnas Mansuri

                187




                187






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Magento Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f270563%2fcategories-are-not-in-order-same-as-in-admin-panel-magento-2%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    “%fieldName is a required field.”, in Magento2 REST API Call for GET Method Type The Next...

                    How to change City field to a dropdown in Checkout step Magento 2Magento 2 : How to change UI field(s)...

                    變成蝙蝠會怎樣? 參考資料 外部連結 导航菜单Thomas Nagel, "What is it like to be a...