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;
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
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
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 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
add a comment |
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
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 Apr 25 at 17:13
Sohel RanaSohel Rana
23.7k34461
23.7k34461
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
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