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?

What does this Jacques Hadamard quote mean?

How can I use the Python library networkx from Mathematica?

What would be the ideal power source for a cybernetic eye?

Is CEO the profession with the most psychopaths?

How would a mousetrap for use in space work?

Is it fair for a professor to grade us on the possession of past papers?

What's the meaning of "fortified infraction restraint"?

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

Is safe to use va_start macro with this as parameter?

How to find all the available tools in mac terminal?

How to convince students of the implication truth values?

Is it a good idea to use CNN to classify 1D signal?

Is there any way for the UK Prime Minister to make a motion directly dependent on Government confidence?

When a candle burns, why does the top of wick glow if bottom of flame is hottest?

What are the out-of-universe reasons for the references to Toby Maguire-era Spider-Man in ITSV

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

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

Most bit efficient text communication method?

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

What is homebrew?

Has negative voting ever been officially implemented in elections, or seriously proposed, or even studied?

Can you use the Shield Master feat to shove someone before you make an attack by using a Readied action?

Did MS DOS itself ever use blinking text?

Closed form of recurrent arithmetic series summation



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 6 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 4 mins 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

                    Nidaros erkebispedøme

                    Birsay

                    Was Woodrow Wilson really a Liberal?Was World War I a war of liberals against authoritarians?Founding Fathers...