How to get product by name attribute 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.1 get custom options for related productsGet custom attribute in category loop?How to Get product id and Sku By product name magento 2..?Magento 2: How to display brand name above product nameGet Regular Price of Configurable Simple ProductHow to change product name in frontendMagento 2: Get Related products from Product Id now showing Name and priceHow to get Sku, name, and image in magento2 in phtml fileHow to remove SKU from product name in search results?How to save stock taking by name product - update quantity by name product

Why not send Voyager 3 and 4 following up the paths taken by Voyager 1 and 2 to re-transmit signals of later as they fly away from Earth?

Getting out of while loop on console

New Order #6: Easter Egg

Why complex landing gears are used instead of simple,reliability and light weight muscle wire or shape memory alloys?

Asymptotics question

What order were files/directories output in dir?

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

"klopfte jemand" or "jemand klopfte"?

what is the log of the PDF for a Normal Distribution?

One-one communication

What are the main differences between the original Stargate SG-1 and the Final Cut edition?

Sally's older brother

Moving a wrapfig vertically to encroach partially on a subsection title

Co-worker has annoying ringtone

What is the "studentd" process?

Would color changing eyes affect vision?

I got rid of Mac OSX and replaced it with linux but now I can't change it back to OSX or windows

What initially awakened the Balrog?

Why do early math courses focus on the cross sections of a cone and not on other 3D objects?

Can you force honesty by using the Speak with Dead and Zone of Truth spells together?

Putting class ranking in CV, but against dept guidelines

I can't produce songs

Does the Mueller report show a conspiracy between Russia and the Trump Campaign?

Test print coming out spongy



How to get product by name attribute



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.1 get custom options for related productsGet custom attribute in category loop?How to Get product id and Sku By product name magento 2..?Magento 2: How to display brand name above product nameGet Regular Price of Configurable Simple ProductHow to change product name in frontendMagento 2: Get Related products from Product Id now showing Name and priceHow to get Sku, name, and image in magento2 in phtml fileHow to remove SKU from product name in search results?How to save stock taking by name product - update quantity by name product



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








0















I want get product by sku, name, price.I do not know how to get it. Please help me. i get it by sku is success but name or price isn't success.










share|improve this question






























    0















    I want get product by sku, name, price.I do not know how to get it. Please help me. i get it by sku is success but name or price isn't success.










    share|improve this question


























      0












      0








      0


      1






      I want get product by sku, name, price.I do not know how to get it. Please help me. i get it by sku is success but name or price isn't success.










      share|improve this question
















      I want get product by sku, name, price.I do not know how to get it. Please help me. i get it by sku is success but name or price isn't success.







      magento2






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 2 days ago









      Rv Singh

      730418




      730418










      asked 2 days ago









      TN98TN98

      487




      487




















          1 Answer
          1






          active

          oldest

          votes


















          1














          you can get product by name or price by using this code



          namespace AbdusTestHelper;



          class HelperData extends MagentoFrameworkAppHelperAbstractHelper

          protected $_productsFactory;

          public function __construct(

          MagentoCatalogModelResourceModelProductCollectionFactory $productFactory

          )


          $this->_productsFactory = $productFactory;



          public function getProductCollection($productId)

          $price = 500;
          $name = 'little shirt';

          $productCollection = $this->_productsFactory->create()
          ->addFieldToFilter('price', $price)
          ->addFieldToFilter('name', $name)
          ->addAttributeToSelect('*');
          return $productCollection;








          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%2f270612%2fhow-to-get-product-by-name-attribute%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









            1














            you can get product by name or price by using this code



            namespace AbdusTestHelper;



            class HelperData extends MagentoFrameworkAppHelperAbstractHelper

            protected $_productsFactory;

            public function __construct(

            MagentoCatalogModelResourceModelProductCollectionFactory $productFactory

            )


            $this->_productsFactory = $productFactory;



            public function getProductCollection($productId)

            $price = 500;
            $name = 'little shirt';

            $productCollection = $this->_productsFactory->create()
            ->addFieldToFilter('price', $price)
            ->addFieldToFilter('name', $name)
            ->addAttributeToSelect('*');
            return $productCollection;








            share|improve this answer



























              1














              you can get product by name or price by using this code



              namespace AbdusTestHelper;



              class HelperData extends MagentoFrameworkAppHelperAbstractHelper

              protected $_productsFactory;

              public function __construct(

              MagentoCatalogModelResourceModelProductCollectionFactory $productFactory

              )


              $this->_productsFactory = $productFactory;



              public function getProductCollection($productId)

              $price = 500;
              $name = 'little shirt';

              $productCollection = $this->_productsFactory->create()
              ->addFieldToFilter('price', $price)
              ->addFieldToFilter('name', $name)
              ->addAttributeToSelect('*');
              return $productCollection;








              share|improve this answer

























                1












                1








                1







                you can get product by name or price by using this code



                namespace AbdusTestHelper;



                class HelperData extends MagentoFrameworkAppHelperAbstractHelper

                protected $_productsFactory;

                public function __construct(

                MagentoCatalogModelResourceModelProductCollectionFactory $productFactory

                )


                $this->_productsFactory = $productFactory;



                public function getProductCollection($productId)

                $price = 500;
                $name = 'little shirt';

                $productCollection = $this->_productsFactory->create()
                ->addFieldToFilter('price', $price)
                ->addFieldToFilter('name', $name)
                ->addAttributeToSelect('*');
                return $productCollection;








                share|improve this answer













                you can get product by name or price by using this code



                namespace AbdusTestHelper;



                class HelperData extends MagentoFrameworkAppHelperAbstractHelper

                protected $_productsFactory;

                public function __construct(

                MagentoCatalogModelResourceModelProductCollectionFactory $productFactory

                )


                $this->_productsFactory = $productFactory;



                public function getProductCollection($productId)

                $price = 500;
                $name = 'little shirt';

                $productCollection = $this->_productsFactory->create()
                ->addFieldToFilter('price', $price)
                ->addFieldToFilter('name', $name)
                ->addAttributeToSelect('*');
                return $productCollection;









                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 2 days ago









                abdusabdus

                3729




                3729



























                    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%2f270612%2fhow-to-get-product-by-name-attribute%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

                    Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                    Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

                    Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?