Sort products in ascending order by name on specific category page not working Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Sort products by alphabets first and numbers last on listing pageLoad Specific Brand Products on Top On Category PageProduct Sorting in Category PageMagento changing sort order on filtered navigationOrder category by positionsort options Url parameters '?' change to '&' so 404 errorDefault sort order for default sort attributesmagento 2 : Product listing default sorting order based on attributesSort Product Collection By Event Date Custom fieldMagento 2 Product Form Categories Sort Alphabetically From the Backend

What is ls Largest Number Formed by only moving two sticks in 508?

Why do people think Winterfell crypts is the safest place for women, children and old people?

Was there ever a LEGO store in Miami International Airport?

What to do with someone that cheated their way though university and a PhD program?

Why is arima in R one time step off?

Retract an already submitted Recommendation Letter (written for an undergrad student)

/bin/ls sorts differently than just ls

Could a cockatrice have parasitic embryos?

Is it appropriate to mention a relatable company blog post when you're asked about the company?

Is it OK if I do not take the receipt in Germany?

Does using the Inspiration rules for character defects encourage My Guy Syndrome?

When I export an AI 300x60 art board it saves with bigger dimensions

Are there existing rules/lore for MTG planeswalkers?

Raising a bilingual kid. When should we introduce the majority language?

Does Prince Arnaud cause someone holding the Princess to lose?

What is the evidence that custom checks in Northern Ireland are going to result in violence?

Is a self contained air-bullet cartridge feasible?

Why doesn't the university give past final exams' answers?

In search of the origins of term censor, I hit a dead end stuck with the greek term, to censor, λογοκρίνω

Page Layouts : 1 column , 2 columns-left , 2 columns-right , 3 column

"Working on a knee"

What is a 'Key' in computer science?

Has a Nobel Peace laureate ever been accused of war crimes?

Suing a Police Officer Instead of the Police Department



Sort products in ascending order by name on specific category page not working



Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Sort products by alphabets first and numbers last on listing pageLoad Specific Brand Products on Top On Category PageProduct Sorting in Category PageMagento changing sort order on filtered navigationOrder category by positionsort options Url parameters '?' change to '&' so 404 errorDefault sort order for default sort attributesmagento 2 : Product listing default sorting order based on attributesSort Product Collection By Event Date Custom fieldMagento 2 Product Form Categories Sort Alphabetically From the Backend



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








1















I want to sort product for a specific category by name in ascending order but it is still sorting in descending order in the front-end.



For a category under Display Setting, I have set Default Product Listing Sort By to Product Name



<referenceContainer name="content">
<referenceBlock name="product_list_toolbar">
<action method="setDefaultDirection">
<argument name="dir" xsi:type="string">asc</argument>
</action>
</referenceBlock>
</referenceContainer>


Here is how it looks.



enter image description here



I have checked the setting in all store view and I have the same setting.



Any help will be highly appreciated.



Thank you










share|improve this question






















  • may be It can be an indexing issue.did you reindexed or not ?

    – Savan Patel
    Apr 19 at 12:38












  • @SavanPatel I already tried that and it did not work.

    – Kevin S
    Apr 19 at 12:51











  • try below code , hope it useful

    – Savan Patel
    Apr 19 at 13:33











  • I have just tried it in my localhost without putting the code in the Design section's layout Update XML. I found it working fine. Please check nimb.ws/1J9mKv and nimb.ws/x3MHPz

    – Mohit Kumar Arora
    Apr 19 at 13:41

















1















I want to sort product for a specific category by name in ascending order but it is still sorting in descending order in the front-end.



For a category under Display Setting, I have set Default Product Listing Sort By to Product Name



<referenceContainer name="content">
<referenceBlock name="product_list_toolbar">
<action method="setDefaultDirection">
<argument name="dir" xsi:type="string">asc</argument>
</action>
</referenceBlock>
</referenceContainer>


Here is how it looks.



enter image description here



I have checked the setting in all store view and I have the same setting.



Any help will be highly appreciated.



Thank you










share|improve this question






















  • may be It can be an indexing issue.did you reindexed or not ?

    – Savan Patel
    Apr 19 at 12:38












  • @SavanPatel I already tried that and it did not work.

    – Kevin S
    Apr 19 at 12:51











  • try below code , hope it useful

    – Savan Patel
    Apr 19 at 13:33











  • I have just tried it in my localhost without putting the code in the Design section's layout Update XML. I found it working fine. Please check nimb.ws/1J9mKv and nimb.ws/x3MHPz

    – Mohit Kumar Arora
    Apr 19 at 13:41













1












1








1








I want to sort product for a specific category by name in ascending order but it is still sorting in descending order in the front-end.



For a category under Display Setting, I have set Default Product Listing Sort By to Product Name



<referenceContainer name="content">
<referenceBlock name="product_list_toolbar">
<action method="setDefaultDirection">
<argument name="dir" xsi:type="string">asc</argument>
</action>
</referenceBlock>
</referenceContainer>


Here is how it looks.



enter image description here



I have checked the setting in all store view and I have the same setting.



Any help will be highly appreciated.



Thank you










share|improve this question














I want to sort product for a specific category by name in ascending order but it is still sorting in descending order in the front-end.



For a category under Display Setting, I have set Default Product Listing Sort By to Product Name



<referenceContainer name="content">
<referenceBlock name="product_list_toolbar">
<action method="setDefaultDirection">
<argument name="dir" xsi:type="string">asc</argument>
</action>
</referenceBlock>
</referenceContainer>


Here is how it looks.



enter image description here



I have checked the setting in all store view and I have the same setting.



Any help will be highly appreciated.



Thank you







magento2 sorting category-listing product-sorting






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Apr 19 at 12:14









Kevin SKevin S

192622




192622












  • may be It can be an indexing issue.did you reindexed or not ?

    – Savan Patel
    Apr 19 at 12:38












  • @SavanPatel I already tried that and it did not work.

    – Kevin S
    Apr 19 at 12:51











  • try below code , hope it useful

    – Savan Patel
    Apr 19 at 13:33











  • I have just tried it in my localhost without putting the code in the Design section's layout Update XML. I found it working fine. Please check nimb.ws/1J9mKv and nimb.ws/x3MHPz

    – Mohit Kumar Arora
    Apr 19 at 13:41

















  • may be It can be an indexing issue.did you reindexed or not ?

    – Savan Patel
    Apr 19 at 12:38












  • @SavanPatel I already tried that and it did not work.

    – Kevin S
    Apr 19 at 12:51











  • try below code , hope it useful

    – Savan Patel
    Apr 19 at 13:33











  • I have just tried it in my localhost without putting the code in the Design section's layout Update XML. I found it working fine. Please check nimb.ws/1J9mKv and nimb.ws/x3MHPz

    – Mohit Kumar Arora
    Apr 19 at 13:41
















may be It can be an indexing issue.did you reindexed or not ?

– Savan Patel
Apr 19 at 12:38






may be It can be an indexing issue.did you reindexed or not ?

– Savan Patel
Apr 19 at 12:38














@SavanPatel I already tried that and it did not work.

– Kevin S
Apr 19 at 12:51





@SavanPatel I already tried that and it did not work.

– Kevin S
Apr 19 at 12:51













try below code , hope it useful

– Savan Patel
Apr 19 at 13:33





try below code , hope it useful

– Savan Patel
Apr 19 at 13:33













I have just tried it in my localhost without putting the code in the Design section's layout Update XML. I found it working fine. Please check nimb.ws/1J9mKv and nimb.ws/x3MHPz

– Mohit Kumar Arora
Apr 19 at 13:41





I have just tried it in my localhost without putting the code in the Design section's layout Update XML. I found it working fine. Please check nimb.ws/1J9mKv and nimb.ws/x3MHPz

– Mohit Kumar Arora
Apr 19 at 13:41










1 Answer
1






active

oldest

votes


















0














Try this code



 <referenceContainer name="content">
<referenceBlock name="category.products.list">
<action method="setDefaultDirection">
<argument name="dir" xsi:type="string">asc</argument>
</action>
</referenceBlock>
</referenceContainer>


It's working for my side






share|improve this answer























    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%2f270789%2fsort-products-in-ascending-order-by-name-on-specific-category-page-not-working%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














    Try this code



     <referenceContainer name="content">
    <referenceBlock name="category.products.list">
    <action method="setDefaultDirection">
    <argument name="dir" xsi:type="string">asc</argument>
    </action>
    </referenceBlock>
    </referenceContainer>


    It's working for my side






    share|improve this answer



























      0














      Try this code



       <referenceContainer name="content">
      <referenceBlock name="category.products.list">
      <action method="setDefaultDirection">
      <argument name="dir" xsi:type="string">asc</argument>
      </action>
      </referenceBlock>
      </referenceContainer>


      It's working for my side






      share|improve this answer

























        0












        0








        0







        Try this code



         <referenceContainer name="content">
        <referenceBlock name="category.products.list">
        <action method="setDefaultDirection">
        <argument name="dir" xsi:type="string">asc</argument>
        </action>
        </referenceBlock>
        </referenceContainer>


        It's working for my side






        share|improve this answer













        Try this code



         <referenceContainer name="content">
        <referenceBlock name="category.products.list">
        <action method="setDefaultDirection">
        <argument name="dir" xsi:type="string">asc</argument>
        </action>
        </referenceBlock>
        </referenceContainer>


        It's working for my side







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 19 at 13:24









        Savan PatelSavan Patel

        6610




        6610



























            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%2f270789%2fsort-products-in-ascending-order-by-name-on-specific-category-page-not-working%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

            Sum ergo cogito? 1 nng

            419 nièngy_Soadمي 19bal1.5o_g

            Queiggey Chernihivv 9NnOo i Zw X QqKk LpB