0

I just have this button here in the Catalog > Products page

I just want to be able to remove/hide it programmatically.

put on hold as too broad by Shoaib Munir, Jai, Aasim Goriya, Priyank, Mohit Kumar Arora 2 days ago

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Can you please provide more infomation? as from what you have put you want to remove the filters from the product grid within the admin – Dava Gordon Aug 14 at 14:57
  • That's correct, I just want to hide/remove the button. – davidelias16 Aug 15 at 4:41
0

you can rewrite product_listing.xml.

path:vendor/magento/modulecatalog/view/adminhtml/ui_component/product_listing.xml

remove code in the product_listing.xml:

<filters name="listing_filters">
            <filterSelect name="store_id" provider="${ $.parentName }">
                <settings>
                    <options class="Magento\Store\Ui\Component\Listing\Column\Store\Options"/>
                    <caption translate="true">All Store Views</caption>
                    <label translate="true">Store View</label>
                    <dataScope>store_id</dataScope>
                </settings>
            </filterSelect>
 </filters>
  • never edit vendor, as next time you run composer update the file changed will be reveted. if your going to impliment this id suggest you create a module under app and do it that way – Dava Gordon yesterday
-1

Search for this button code in phtml , where it is rendered. Create simple module: 1.add to system.xml select with yes /no. 2.create helper, that will check this setting. 3.add your helper to phtml file. 4. Add a construction if with checking your value from admin configuration ( this is doing by helper). And check - if in admin it is value = 1(yes,hide it) , u should not render it.

Not the answer you're looking for? Browse other questions tagged or ask your own question.