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

            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?