Magento 2 : Join category name in product collectionAdd Customs column to Admin > sales >orderAdding attribute using JOIN to CollectionMagento 2 Join Product Name To Custom Grid DI Not workingAfter join the customer name with custom module, i can't filter the grid by customer namehow to join fields like product skus in sales order grid collection in magento2?Filter product collection by sku or nameMagento - Add customer attribute to order gridMagento 2 Create dynamic array From different Model Collection to use in multi select in gridAfter return parent::_prepareCollection() store filter not working in product collectionMagento 2 : Category name filter in product grid in custom module
How do I express some one as a black person?
How do I deal with a powergamer in a game full of beginners in a school club?
Replacing Windows 7 security updates with anti-virus?
Set and print content of environment variable in cmd.exe subshell?
How do I locate a classical quotation?
Making a sword in the stone, in a medieval world without magic
How do you like my writing?
Low budget alien movie about the Earth being cooked
What does a stand alone "T" index value do?
infinitive telling the purpose
"One can do his homework in the library"
Algorithm to convert a fixed-length string to the smallest possible collision-free representation?
Built-In Shelves/Bookcases - IKEA vs Built
The bar has been raised
Solving "Resistance between two nodes on a grid" problem in Mathematica
What to do when during a meeting client people start to fight (even physically) with each others?
Do items de-spawn in Diablo?
Unreachable code, but reachable with exception
Rejected in 4th interview round citing insufficient years of experience
How did Alan Turing break the enigma code using the hint given by the lady in the bar?
A three room house but a three headED dog
Is there an elementary proof that there are infinitely many primes that are *not* completely split in an abelian extension?
Good for you! in Russian
Good allowance savings plan?
Magento 2 : Join category name in product collection
Add Customs column to Admin > sales >orderAdding attribute using JOIN to CollectionMagento 2 Join Product Name To Custom Grid DI Not workingAfter join the customer name with custom module, i can't filter the grid by customer namehow to join fields like product skus in sales order grid collection in magento2?Filter product collection by sku or nameMagento - Add customer attribute to order gridMagento 2 Create dynamic array From different Model Collection to use in multi select in gridAfter return parent::_prepareCollection() store filter not working in product collectionMagento 2 : Category name filter in product grid in custom module
I want to join category name in product collection. I want to use that in product grid filter which is used in my custom module.
This is my collection code. It's same as like this _prepareCollection() :
vendor/magento/module-catalog/Block/Adminhtml/Product/Grid.php
protected $productFactory;
public function __construct(
.....
MagentoCatalogModelProductFactory $productFactory,
.....
)
.....
$this->productFactory = $productFactory;
.....
protected function _prepareCollection()
$store = $this->_getStore();
$collection = $this->productFactory->create()->getCollection()
->addAttributeToSelect(
'sku'
)->addAttributeToSelect(
'name'
)->addAttributeToSelect(
'attribute_set_id'
)->addAttributeToSelect(
'type_id'
)->setStore(
$store
);
How to do it?
Any help would be appriciated.
Thanks.
magento2 product grid
add a comment |
I want to join category name in product collection. I want to use that in product grid filter which is used in my custom module.
This is my collection code. It's same as like this _prepareCollection() :
vendor/magento/module-catalog/Block/Adminhtml/Product/Grid.php
protected $productFactory;
public function __construct(
.....
MagentoCatalogModelProductFactory $productFactory,
.....
)
.....
$this->productFactory = $productFactory;
.....
protected function _prepareCollection()
$store = $this->_getStore();
$collection = $this->productFactory->create()->getCollection()
->addAttributeToSelect(
'sku'
)->addAttributeToSelect(
'name'
)->addAttributeToSelect(
'attribute_set_id'
)->addAttributeToSelect(
'type_id'
)->setStore(
$store
);
How to do it?
Any help would be appriciated.
Thanks.
magento2 product grid
I'm not sure what you want as result since a product can be in more than one category. Therefore your grid would have more entries for one product sku if the product is in more than one category. Is that what you expect?
– HelgeB
8 hours ago
add a comment |
I want to join category name in product collection. I want to use that in product grid filter which is used in my custom module.
This is my collection code. It's same as like this _prepareCollection() :
vendor/magento/module-catalog/Block/Adminhtml/Product/Grid.php
protected $productFactory;
public function __construct(
.....
MagentoCatalogModelProductFactory $productFactory,
.....
)
.....
$this->productFactory = $productFactory;
.....
protected function _prepareCollection()
$store = $this->_getStore();
$collection = $this->productFactory->create()->getCollection()
->addAttributeToSelect(
'sku'
)->addAttributeToSelect(
'name'
)->addAttributeToSelect(
'attribute_set_id'
)->addAttributeToSelect(
'type_id'
)->setStore(
$store
);
How to do it?
Any help would be appriciated.
Thanks.
magento2 product grid
I want to join category name in product collection. I want to use that in product grid filter which is used in my custom module.
This is my collection code. It's same as like this _prepareCollection() :
vendor/magento/module-catalog/Block/Adminhtml/Product/Grid.php
protected $productFactory;
public function __construct(
.....
MagentoCatalogModelProductFactory $productFactory,
.....
)
.....
$this->productFactory = $productFactory;
.....
protected function _prepareCollection()
$store = $this->_getStore();
$collection = $this->productFactory->create()->getCollection()
->addAttributeToSelect(
'sku'
)->addAttributeToSelect(
'name'
)->addAttributeToSelect(
'attribute_set_id'
)->addAttributeToSelect(
'type_id'
)->setStore(
$store
);
How to do it?
Any help would be appriciated.
Thanks.
magento2 product grid
magento2 product grid
edited 9 hours ago
Gee Emm
1078
1078
asked 10 hours ago
Emipro Technologies Pvt. Ltd.Emipro Technologies Pvt. Ltd.
2,5911825
2,5911825
I'm not sure what you want as result since a product can be in more than one category. Therefore your grid would have more entries for one product sku if the product is in more than one category. Is that what you expect?
– HelgeB
8 hours ago
add a comment |
I'm not sure what you want as result since a product can be in more than one category. Therefore your grid would have more entries for one product sku if the product is in more than one category. Is that what you expect?
– HelgeB
8 hours ago
I'm not sure what you want as result since a product can be in more than one category. Therefore your grid would have more entries for one product sku if the product is in more than one category. Is that what you expect?
– HelgeB
8 hours ago
I'm not sure what you want as result since a product can be in more than one category. Therefore your grid would have more entries for one product sku if the product is in more than one category. Is that what you expect?
– HelgeB
8 hours ago
add a comment |
0
active
oldest
votes
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%2f265525%2fmagento-2-join-category-name-in-product-collection%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f265525%2fmagento-2-join-category-name-in-product-collection%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
I'm not sure what you want as result since a product can be in more than one category. Therefore your grid would have more entries for one product sku if the product is in more than one category. Is that what you expect?
– HelgeB
8 hours ago