Hide virtual products on backend listingHide all product images - for store selling only virtual productsMagento 2 : Hide Product Images Using DatabaseHide product in catalog pageHide Configurable product images from details page when color swatch is selectedhow to get virtual product data in product listing page and show in configurable product in magento 2?Is it possible to combine Configurable Products With Grouped Products Together On One Listing?Magento2: Issue listing productsHow to hide out of stock product and set product limit per page for custom product collection in Magento?Change Product type From physical Configurable/Simple to Virtual after adding it to baskethide out of stock products from layered navigation in magento2

In the time of the mishna, were there Jewish cities without courts?

Does the EU Common Fisheries Policy cover British Overseas Territories?

Historically, were women trained for obligatory wars? Or did they serve some other military function?

Colliding particles and Activation energy

Why does processed meat contain preservatives, while canned fish needs not?

Python "triplet" dictionary?

A non-technological, repeating, visible object in the sky, holding its position in the sky for hours

Is it possible to Ready a spell to be cast just before the start of your next turn by having the trigger be an ally's attack?

Pulling the rope with one hand is as heavy as with two hands?

Will tsunami waves travel forever if there was no land?

Does a creature that is immune to a condition still make a saving throw?

Confusion about capacitors

Illegal assignment from SObject to Contact

Multiple options for Pseudonyms

How does a Swashbuckler rogue "fight with two weapons while safely darting away"?

What does YCWCYODFTRFDTY mean?

Is creating your own "experiment" considered cheating during a physics exam?

Options leqno, reqno for documentclass or exist another option?

Does jamais mean always or never in this context?

If Earth is tilted, why is Polaris always above the same spot?

What is a Recurrent Neural Network?

Has any spacecraft ever had the ability to directly communicate with civilian air traffic control?

Pressure to defend the relevance of one's area of mathematics

Why does nature favour the Laplacian?



Hide virtual products on backend listing


Hide all product images - for store selling only virtual productsMagento 2 : Hide Product Images Using DatabaseHide product in catalog pageHide Configurable product images from details page when color swatch is selectedhow to get virtual product data in product listing page and show in configurable product in magento 2?Is it possible to combine Configurable Products With Grouped Products Together On One Listing?Magento2: Issue listing productsHow to hide out of stock product and set product limit per page for custom product collection in Magento?Change Product type From physical Configurable/Simple to Virtual after adding it to baskethide out of stock products from layered navigation in magento2






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








1















I have a lot of configurable product in my backend listing, I'd like to know how can I hide all my virtual product ? (I want to show only configurable products on my backend).



Can I do this from the backoffice or should I hide them programmaticaly ? And how ?










share|improve this question






















  • Did you try filter listing?

    – Sohel Rana
    Apr 25 at 14:31











  • I don't want to simply add a filter, because I don't want the user to have control on this (he won't be able to see them through backend listing).

    – Morgan Tartreau
    Apr 25 at 16:23

















1















I have a lot of configurable product in my backend listing, I'd like to know how can I hide all my virtual product ? (I want to show only configurable products on my backend).



Can I do this from the backoffice or should I hide them programmaticaly ? And how ?










share|improve this question






















  • Did you try filter listing?

    – Sohel Rana
    Apr 25 at 14:31











  • I don't want to simply add a filter, because I don't want the user to have control on this (he won't be able to see them through backend listing).

    – Morgan Tartreau
    Apr 25 at 16:23













1












1








1








I have a lot of configurable product in my backend listing, I'd like to know how can I hide all my virtual product ? (I want to show only configurable products on my backend).



Can I do this from the backoffice or should I hide them programmaticaly ? And how ?










share|improve this question














I have a lot of configurable product in my backend listing, I'd like to know how can I hide all my virtual product ? (I want to show only configurable products on my backend).



Can I do this from the backoffice or should I hide them programmaticaly ? And how ?







magento2 product backend listing






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Apr 25 at 14:21









Morgan TartreauMorgan Tartreau

443112




443112












  • Did you try filter listing?

    – Sohel Rana
    Apr 25 at 14:31











  • I don't want to simply add a filter, because I don't want the user to have control on this (he won't be able to see them through backend listing).

    – Morgan Tartreau
    Apr 25 at 16:23

















  • Did you try filter listing?

    – Sohel Rana
    Apr 25 at 14:31











  • I don't want to simply add a filter, because I don't want the user to have control on this (he won't be able to see them through backend listing).

    – Morgan Tartreau
    Apr 25 at 16:23
















Did you try filter listing?

– Sohel Rana
Apr 25 at 14:31





Did you try filter listing?

– Sohel Rana
Apr 25 at 14:31













I don't want to simply add a filter, because I don't want the user to have control on this (he won't be able to see them through backend listing).

– Morgan Tartreau
Apr 25 at 16:23





I don't want to simply add a filter, because I don't want the user to have control on this (he won't be able to see them through backend listing).

– Morgan Tartreau
Apr 25 at 16:23










1 Answer
1






active

oldest

votes


















0














Suppose you have SR_MagentoCommunity module. Now added folowing file in your module that will avoid showing virtual type product in admin grid.




app/code/SR/MagentoCommunity/etc/adminhtml/di.xml




<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="MagentoCatalogUiDataProviderProductProductDataProvider">
<plugin name="sr_product_list" type="SRMagentoCommunityPluginCatalogUiDataProviderProductProductDataProvider" sortOrder="1"/>
</type>
</config>



app/code/SR/MagentoCommunity/Plugin/Catalog/Ui/DataProvider/Product/ProductDataProvider.php




<?php
namespace SRMagentoCommunityPluginCatalogUiDataProviderProduct;

class ProductDataProvider

/**
* @param MagentoCatalogUiDataProviderProductProductDataProvider $subject
* @param MagentoCatalogModelResourceModelProductCollection $collection
* @return mixed
*/
public function afterGetCollection(
MagentoCatalogUiDataProviderProductProductDataProvider $subject,
$collection
)
$collection->addFieldToFilter('type_id', ['nin' => 'virtual']);
return $collection;







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%2f272468%2fhide-virtual-products-on-backend-listing%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














    Suppose you have SR_MagentoCommunity module. Now added folowing file in your module that will avoid showing virtual type product in admin grid.




    app/code/SR/MagentoCommunity/etc/adminhtml/di.xml




    <?xml version="1.0"?>
    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="MagentoCatalogUiDataProviderProductProductDataProvider">
    <plugin name="sr_product_list" type="SRMagentoCommunityPluginCatalogUiDataProviderProductProductDataProvider" sortOrder="1"/>
    </type>
    </config>



    app/code/SR/MagentoCommunity/Plugin/Catalog/Ui/DataProvider/Product/ProductDataProvider.php




    <?php
    namespace SRMagentoCommunityPluginCatalogUiDataProviderProduct;

    class ProductDataProvider

    /**
    * @param MagentoCatalogUiDataProviderProductProductDataProvider $subject
    * @param MagentoCatalogModelResourceModelProductCollection $collection
    * @return mixed
    */
    public function afterGetCollection(
    MagentoCatalogUiDataProviderProductProductDataProvider $subject,
    $collection
    )
    $collection->addFieldToFilter('type_id', ['nin' => 'virtual']);
    return $collection;







    share|improve this answer



























      0














      Suppose you have SR_MagentoCommunity module. Now added folowing file in your module that will avoid showing virtual type product in admin grid.




      app/code/SR/MagentoCommunity/etc/adminhtml/di.xml




      <?xml version="1.0"?>
      <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
      <type name="MagentoCatalogUiDataProviderProductProductDataProvider">
      <plugin name="sr_product_list" type="SRMagentoCommunityPluginCatalogUiDataProviderProductProductDataProvider" sortOrder="1"/>
      </type>
      </config>



      app/code/SR/MagentoCommunity/Plugin/Catalog/Ui/DataProvider/Product/ProductDataProvider.php




      <?php
      namespace SRMagentoCommunityPluginCatalogUiDataProviderProduct;

      class ProductDataProvider

      /**
      * @param MagentoCatalogUiDataProviderProductProductDataProvider $subject
      * @param MagentoCatalogModelResourceModelProductCollection $collection
      * @return mixed
      */
      public function afterGetCollection(
      MagentoCatalogUiDataProviderProductProductDataProvider $subject,
      $collection
      )
      $collection->addFieldToFilter('type_id', ['nin' => 'virtual']);
      return $collection;







      share|improve this answer

























        0












        0








        0







        Suppose you have SR_MagentoCommunity module. Now added folowing file in your module that will avoid showing virtual type product in admin grid.




        app/code/SR/MagentoCommunity/etc/adminhtml/di.xml




        <?xml version="1.0"?>
        <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
        <type name="MagentoCatalogUiDataProviderProductProductDataProvider">
        <plugin name="sr_product_list" type="SRMagentoCommunityPluginCatalogUiDataProviderProductProductDataProvider" sortOrder="1"/>
        </type>
        </config>



        app/code/SR/MagentoCommunity/Plugin/Catalog/Ui/DataProvider/Product/ProductDataProvider.php




        <?php
        namespace SRMagentoCommunityPluginCatalogUiDataProviderProduct;

        class ProductDataProvider

        /**
        * @param MagentoCatalogUiDataProviderProductProductDataProvider $subject
        * @param MagentoCatalogModelResourceModelProductCollection $collection
        * @return mixed
        */
        public function afterGetCollection(
        MagentoCatalogUiDataProviderProductProductDataProvider $subject,
        $collection
        )
        $collection->addFieldToFilter('type_id', ['nin' => 'virtual']);
        return $collection;







        share|improve this answer













        Suppose you have SR_MagentoCommunity module. Now added folowing file in your module that will avoid showing virtual type product in admin grid.




        app/code/SR/MagentoCommunity/etc/adminhtml/di.xml




        <?xml version="1.0"?>
        <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
        <type name="MagentoCatalogUiDataProviderProductProductDataProvider">
        <plugin name="sr_product_list" type="SRMagentoCommunityPluginCatalogUiDataProviderProductProductDataProvider" sortOrder="1"/>
        </type>
        </config>



        app/code/SR/MagentoCommunity/Plugin/Catalog/Ui/DataProvider/Product/ProductDataProvider.php




        <?php
        namespace SRMagentoCommunityPluginCatalogUiDataProviderProduct;

        class ProductDataProvider

        /**
        * @param MagentoCatalogUiDataProviderProductProductDataProvider $subject
        * @param MagentoCatalogModelResourceModelProductCollection $collection
        * @return mixed
        */
        public function afterGetCollection(
        MagentoCatalogUiDataProviderProductProductDataProvider $subject,
        $collection
        )
        $collection->addFieldToFilter('type_id', ['nin' => 'virtual']);
        return $collection;








        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 25 at 17:13









        Sohel RanaSohel Rana

        23.7k34461




        23.7k34461



























            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%2f272468%2fhide-virtual-products-on-backend-listing%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