Magento 2 how to filter product collection on category page with custom filtersCustom category collection not rendering correct results in layered navigation and toolbar in magento 2Filter magento product collection by category id but NOT category childrenMagento 2 Product Collection with Multi Categories Layered NavigationRemove Category filter from Shop By Filter Renderer in Magento 2Magento 2 : Static blocks with products on category landing pageMagento-2 How to get custom product collection in catalog search result based on particular categoryMagento-2 How to change product collection based on categoriesHow to apply visibility filter to category view's product collection in magento 2?How to get current category price range filter list in Magento2Filter on custom product collection
Landing in very high winds
Ideas for 3rd eye abilities
Re-submission of rejected manuscript without informing co-authors
Are white and non-white police officers equally likely to kill black suspects?
When blogging recipes, how can I support both readers who want the narrative/journey and ones who want the printer-friendly recipe?
How is it possible for user's password to be changed after storage was encrypted? (on OS X, Android)
Is ipsum/ipsa/ipse a third person pronoun, or can it serve other functions?
Prime joint compound before latex paint?
Need help identifying/translating a plaque in Tangier, Morocco
If a centaur druid Wild Shapes into a Giant Elk, do their Charge features stack?
Are objects structures and/or vice versa?
Email Account under attack (really) - anything I can do?
How to make payment on the internet without leaving a money trail?
Is "plugging out" electronic devices an American expression?
What do the Banks children have against barley water?
Why did the Germans forbid the possession of pet pigeons in Rostov-on-Don in 1941?
Doomsday-clock for my fantasy planet
Where else does the Shulchan Aruch quote an authority by name?
Can I legally use front facing blue light in the UK?
Unbreakable Formation vs. Cry of the Carnarium
Is a vector space a subspace of itself?
Is window.confirm() accessible?
Is it legal to have the "// (c) 2019 John Smith" header in all files when there are hundreds of contributors?
Why was the "bread communication" in the arena of Catching Fire left out in the movie?
Magento 2 how to filter product collection on category page with custom filters
Custom category collection not rendering correct results in layered navigation and toolbar in magento 2Filter magento product collection by category id but NOT category childrenMagento 2 Product Collection with Multi Categories Layered NavigationRemove Category filter from Shop By Filter Renderer in Magento 2Magento 2 : Static blocks with products on category landing pageMagento-2 How to get custom product collection in catalog search result based on particular categoryMagento-2 How to change product collection based on categoriesHow to apply visibility filter to category view's product collection in magento 2?How to get current category price range filter list in Magento2Filter on custom product collection
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have one category in system... For example EMT. There are many products assigned to it. Now I want to filter some products for particular customers for that category. I mean only specific products should be display in that category for some customers. It should display all the products to guest users.
How can I do that so all the collection should filter with proper layered navigation and toolbar collection.
Can anyone suggest the way to do this with files I need to override?
magento2 category category-products
bumped to the homepage by Community♦ 15 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I have one category in system... For example EMT. There are many products assigned to it. Now I want to filter some products for particular customers for that category. I mean only specific products should be display in that category for some customers. It should display all the products to guest users.
How can I do that so all the collection should filter with proper layered navigation and toolbar collection.
Can anyone suggest the way to do this with files I need to override?
magento2 category category-products
bumped to the homepage by Community♦ 15 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
you have pre list of product to show to customer ?
– Minesh Patel
Nov 2 '17 at 7:42
you can use eventcatalog_block_product_list_collection
to filter you products
– Minesh Patel
Nov 2 '17 at 7:45
@RaphaelatDigitalPianism can you help on this?
– Jagdish Barot
Nov 3 '17 at 6:50
add a comment |
I have one category in system... For example EMT. There are many products assigned to it. Now I want to filter some products for particular customers for that category. I mean only specific products should be display in that category for some customers. It should display all the products to guest users.
How can I do that so all the collection should filter with proper layered navigation and toolbar collection.
Can anyone suggest the way to do this with files I need to override?
magento2 category category-products
I have one category in system... For example EMT. There are many products assigned to it. Now I want to filter some products for particular customers for that category. I mean only specific products should be display in that category for some customers. It should display all the products to guest users.
How can I do that so all the collection should filter with proper layered navigation and toolbar collection.
Can anyone suggest the way to do this with files I need to override?
magento2 category category-products
magento2 category category-products
asked Nov 2 '17 at 7:09
Jagdish BarotJagdish Barot
1149
1149
bumped to the homepage by Community♦ 15 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 15 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
you have pre list of product to show to customer ?
– Minesh Patel
Nov 2 '17 at 7:42
you can use eventcatalog_block_product_list_collection
to filter you products
– Minesh Patel
Nov 2 '17 at 7:45
@RaphaelatDigitalPianism can you help on this?
– Jagdish Barot
Nov 3 '17 at 6:50
add a comment |
you have pre list of product to show to customer ?
– Minesh Patel
Nov 2 '17 at 7:42
you can use eventcatalog_block_product_list_collection
to filter you products
– Minesh Patel
Nov 2 '17 at 7:45
@RaphaelatDigitalPianism can you help on this?
– Jagdish Barot
Nov 3 '17 at 6:50
you have pre list of product to show to customer ?
– Minesh Patel
Nov 2 '17 at 7:42
you have pre list of product to show to customer ?
– Minesh Patel
Nov 2 '17 at 7:42
you can use event
catalog_block_product_list_collection
to filter you products– Minesh Patel
Nov 2 '17 at 7:45
you can use event
catalog_block_product_list_collection
to filter you products– Minesh Patel
Nov 2 '17 at 7:45
@RaphaelatDigitalPianism can you help on this?
– Jagdish Barot
Nov 3 '17 at 6:50
@RaphaelatDigitalPianism can you help on this?
– Jagdish Barot
Nov 3 '17 at 6:50
add a comment |
1 Answer
1
active
oldest
votes
I assume you know how to write a plugin and how to write a script in Magento 2. With this in mind, the plan to have your issue resolved would be as follows:
add a product attribute that is a boolean and define for all your products whether they can be displayed to guests or not
—> make it layered enabledupdate all your products in your catalog with a script
in the block
MagentoCatalogBlockProductListProduct
, you may change the function that loads the products using a plugin on thefunction getLoadedProductCollection
wrong product count in layernavigation.
– Jagdish Barot
Oct 16 '18 at 7:56
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%2f199729%2fmagento-2-how-to-filter-product-collection-on-category-page-with-custom-filters%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
I assume you know how to write a plugin and how to write a script in Magento 2. With this in mind, the plan to have your issue resolved would be as follows:
add a product attribute that is a boolean and define for all your products whether they can be displayed to guests or not
—> make it layered enabledupdate all your products in your catalog with a script
in the block
MagentoCatalogBlockProductListProduct
, you may change the function that loads the products using a plugin on thefunction getLoadedProductCollection
wrong product count in layernavigation.
– Jagdish Barot
Oct 16 '18 at 7:56
add a comment |
I assume you know how to write a plugin and how to write a script in Magento 2. With this in mind, the plan to have your issue resolved would be as follows:
add a product attribute that is a boolean and define for all your products whether they can be displayed to guests or not
—> make it layered enabledupdate all your products in your catalog with a script
in the block
MagentoCatalogBlockProductListProduct
, you may change the function that loads the products using a plugin on thefunction getLoadedProductCollection
wrong product count in layernavigation.
– Jagdish Barot
Oct 16 '18 at 7:56
add a comment |
I assume you know how to write a plugin and how to write a script in Magento 2. With this in mind, the plan to have your issue resolved would be as follows:
add a product attribute that is a boolean and define for all your products whether they can be displayed to guests or not
—> make it layered enabledupdate all your products in your catalog with a script
in the block
MagentoCatalogBlockProductListProduct
, you may change the function that loads the products using a plugin on thefunction getLoadedProductCollection
I assume you know how to write a plugin and how to write a script in Magento 2. With this in mind, the plan to have your issue resolved would be as follows:
add a product attribute that is a boolean and define for all your products whether they can be displayed to guests or not
—> make it layered enabledupdate all your products in your catalog with a script
in the block
MagentoCatalogBlockProductListProduct
, you may change the function that loads the products using a plugin on thefunction getLoadedProductCollection
edited Jun 14 '18 at 9:06
Rama Chandran M
2,74181530
2,74181530
answered Jun 14 '18 at 8:59
Herve TribouilloyHerve Tribouilloy
1,349510
1,349510
wrong product count in layernavigation.
– Jagdish Barot
Oct 16 '18 at 7:56
add a comment |
wrong product count in layernavigation.
– Jagdish Barot
Oct 16 '18 at 7:56
wrong product count in layernavigation.
– Jagdish Barot
Oct 16 '18 at 7:56
wrong product count in layernavigation.
– Jagdish Barot
Oct 16 '18 at 7:56
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%2f199729%2fmagento-2-how-to-filter-product-collection-on-category-page-with-custom-filters%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
you have pre list of product to show to customer ?
– Minesh Patel
Nov 2 '17 at 7:42
you can use event
catalog_block_product_list_collection
to filter you products– Minesh Patel
Nov 2 '17 at 7:45
@RaphaelatDigitalPianism can you help on this?
– Jagdish Barot
Nov 3 '17 at 6:50