Magento 2 - Category page sorting does not work on grouped products Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Magento 2 product list sortinghow do I sort related products by position? magento 1.6Sorting product collection on category viewHow to Change Sort by option in Filter Magento 2Magento 2 Sort By Price: Low to High and High to LowMagento related products sort order not workingHow to add noindex,follow to Category page when sorting applied?Magento 2.2.4 Product sorting list by price on category page - How to fix Low to High Sorting IssueHelp with Magento 2.3 custom product sort pluginGrouped product (simple product sorting on price) Magento 2

Lights are flickering on and off after accidentally bumping into light switch

Recursive calls to a function - why is the address of the parameter passed to it lowering with each call?

What kind of capacitor is this in the image?

Magento 2 Editing phtml files in Production Mode

Are Flameskulls resistant to magical piercing damage?

Can gravitational waves pass through a black hole?

What combination of kingdom cards makes for the fewest number of turns to end the game?

Why did Europeans not widely domesticate foxes?

Pointing to problems without suggesting solutions

How can I introduce the names of fantasy creatures to the reader?

How to get a single big right brace?

Can I take recommendation from someone I met at a conference?

Why are two-digit numbers in Jonathan Swift's "Gulliver's Travels" (1726) written in "German style"?

lm and glm function in R

Why aren't these two solutions equivalent? Combinatorics problem

Unix AIX passing variable and arguments to expect and spawn

Can I ask an author to send me his ebook?

How to ask rejected full-time candidates to apply to teach individual courses?

2 sample t test for sample sizes - 30,000 and 150,000

Marquee sign letters

Lemmatization Vs Stemming

Determine the generator of an ideal of ring of integers

Is Bran literally the world's memory?

/bin/ls sorts differently than just ls



Magento 2 - Category page sorting does not work on grouped products



Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Magento 2 product list sortinghow do I sort related products by position? magento 1.6Sorting product collection on category viewHow to Change Sort by option in Filter Magento 2Magento 2 Sort By Price: Low to High and High to LowMagento related products sort order not workingHow to add noindex,follow to Category page when sorting applied?Magento 2.2.4 Product sorting list by price on category page - How to fix Low to High Sorting IssueHelp with Magento 2.3 custom product sort pluginGrouped product (simple product sorting on price) Magento 2



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








1















I added the new product sorting attribute related to price in category page like price low to high and price high to low. It showed on Sort By drop down. It is working fine for configurable product and simple product but the problem is, it is working grouped products case.



Grouped product shows the price of their lowest simple product price in category page.




For Reference please see the screenshot




enter image description here




For Reference I use code for price sorting




$collection->getSelect()->order("price_index.final_price asc");


Any help, experience and knowledge sharing would be appreciated.










share|improve this question




























    1















    I added the new product sorting attribute related to price in category page like price low to high and price high to low. It showed on Sort By drop down. It is working fine for configurable product and simple product but the problem is, it is working grouped products case.



    Grouped product shows the price of their lowest simple product price in category page.




    For Reference please see the screenshot




    enter image description here




    For Reference I use code for price sorting




    $collection->getSelect()->order("price_index.final_price asc");


    Any help, experience and knowledge sharing would be appreciated.










    share|improve this question
























      1












      1








      1








      I added the new product sorting attribute related to price in category page like price low to high and price high to low. It showed on Sort By drop down. It is working fine for configurable product and simple product but the problem is, it is working grouped products case.



      Grouped product shows the price of their lowest simple product price in category page.




      For Reference please see the screenshot




      enter image description here




      For Reference I use code for price sorting




      $collection->getSelect()->order("price_index.final_price asc");


      Any help, experience and knowledge sharing would be appreciated.










      share|improve this question














      I added the new product sorting attribute related to price in category page like price low to high and price high to low. It showed on Sort By drop down. It is working fine for configurable product and simple product but the problem is, it is working grouped products case.



      Grouped product shows the price of their lowest simple product price in category page.




      For Reference please see the screenshot




      enter image description here




      For Reference I use code for price sorting




      $collection->getSelect()->order("price_index.final_price asc");


      Any help, experience and knowledge sharing would be appreciated.







      magento2 magento-enterprise sorting product-prices category-page






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 18 at 5:53









      Muhammad HashamMuhammad Hasham

      3,0012932




      3,0012932




















          1 Answer
          1






          active

          oldest

          votes


















          0














          I resolved this sorting problem by using minimal_price instead of price_index.final_price.



          It will work for product types including simple, configurable and Grouped



          Here is code for that



          //For Descending order
          $collection->getSelect()->order("minimal_price desc");

          //For Ascending order
          $collection->getSelect()->order("minimal_price asc");


          I hope this will help others who are facing a similar kind of sorting problem in category page/product listing page.






          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%2f270573%2fmagento-2-category-page-sorting-does-not-work-on-grouped-products%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 resolved this sorting problem by using minimal_price instead of price_index.final_price.



            It will work for product types including simple, configurable and Grouped



            Here is code for that



            //For Descending order
            $collection->getSelect()->order("minimal_price desc");

            //For Ascending order
            $collection->getSelect()->order("minimal_price asc");


            I hope this will help others who are facing a similar kind of sorting problem in category page/product listing page.






            share|improve this answer



























              0














              I resolved this sorting problem by using minimal_price instead of price_index.final_price.



              It will work for product types including simple, configurable and Grouped



              Here is code for that



              //For Descending order
              $collection->getSelect()->order("minimal_price desc");

              //For Ascending order
              $collection->getSelect()->order("minimal_price asc");


              I hope this will help others who are facing a similar kind of sorting problem in category page/product listing page.






              share|improve this answer

























                0












                0








                0







                I resolved this sorting problem by using minimal_price instead of price_index.final_price.



                It will work for product types including simple, configurable and Grouped



                Here is code for that



                //For Descending order
                $collection->getSelect()->order("minimal_price desc");

                //For Ascending order
                $collection->getSelect()->order("minimal_price asc");


                I hope this will help others who are facing a similar kind of sorting problem in category page/product listing page.






                share|improve this answer













                I resolved this sorting problem by using minimal_price instead of price_index.final_price.



                It will work for product types including simple, configurable and Grouped



                Here is code for that



                //For Descending order
                $collection->getSelect()->order("minimal_price desc");

                //For Ascending order
                $collection->getSelect()->order("minimal_price asc");


                I hope this will help others who are facing a similar kind of sorting problem in category page/product listing page.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 14 hours ago









                Muhammad HashamMuhammad Hasham

                3,0012932




                3,0012932



























                    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%2f270573%2fmagento-2-category-page-sorting-does-not-work-on-grouped-products%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

                    Bulk add to cart function issuecart vs. mini cart issue … rwd themeRedirect Add to cart button to cart pageAdd to cart issue - Magento 2.1The requested Payment Method is not available When creating an orderM2: reason add-to-cart might not function in production modeAdd to cart issue in some android devicesMagento 2 - custom price can not add to subtotal and grand total after add to cartAdd to cart codeIssue with my cart module on pdp and cart pages, just keeps spinningBulk price and quantity update using rest api

                    БиармияSxpst500bh2ntaf! 3h2r