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

                    Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

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

                    Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form