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
Why did C use the -> operator instead of reusing the . operator?
Is Diceware more secure than a long passphrase?
Bayes factor vs P value
Why is the underscore command _ useful?
A strange hotel
Are there moral objections to a life motivated purely by money? How to sway a person from this lifestyle?
Combinatorics problem, right solution?
How bug prioritization works in agile projects vs non agile
Help with my training data
How long after the last departure shall the airport stay open for an emergency return?
Why does Arg'[1. + I] return -0.5?
Is there really no use for MD5 anymore?
How do I deal with a coworker that keeps asking to make small superficial changes to a report, and it is seriously triggering my anxiety?
What is the most expensive material in the world that could be used to create Pun-Pun's lute?
How do I check if a string is entirely made of the same substring?
"My boss was furious with me and I have been fired" vs. "My boss was furious with me and I was fired"
How to not starve gigantic beasts
Why must Chinese maps be obfuscated?
Do I need to watch Ant-Man and the Wasp and Captain Marvel before watching Avengers: Endgame?
A faster way to compute the largest prime factor
Will I lose my paid in full property
Double-nominative constructions and “von”
What is the best way to deal with NPC-NPC combat?
Contradiction proof for inequality of P and NP?
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;
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
add a comment |
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
Did you try filter listing?
– Sohel Rana
6 hours ago
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
4 hours ago
add a comment |
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
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
magento2 product backend listing
asked 6 hours ago
Morgan TartreauMorgan Tartreau
438112
438112
Did you try filter listing?
– Sohel Rana
6 hours ago
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
4 hours ago
add a comment |
Did you try filter listing?
– Sohel Rana
6 hours ago
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
4 hours ago
Did you try filter listing?
– Sohel Rana
6 hours ago
Did you try filter listing?
– Sohel Rana
6 hours ago
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
4 hours ago
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
4 hours ago
add a comment |
1 Answer
1
active
oldest
votes
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;
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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;
add a comment |
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;
add a comment |
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;
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;
answered 3 hours ago
Sohel RanaSohel Rana
23.6k34461
23.6k34461
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
Did you try filter listing?
– Sohel Rana
6 hours ago
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
4 hours ago