- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2020
11:53 PM
03-15-2020
11:53 PM
2 ACCEPTED SOLUTIONS
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2020
12:24 AM
03-16-2020
12:24 AM
@jenny09yop1298 you can check the below link once.
https://webkul.com/blog/how-to-load-store-specific-category-in-magento-2/
Hope it helps.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2020
10:05 AM
03-16-2020
10:05 AM
please use the below code:
public function __construct( \Magento\Catalog\Model\CategoryFactory $categoryFactory ) { $this->categoryFactory = $categoryFactory; } public function execute() { $category = $this->categoryFactory->create()->setStoreId(2)->load(4); //here 2 is the store id of the second store }
If it helps you, please accept it as solution and give kudos.
Regards
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2020
12:01 AM
03-16-2020
12:01 AM
Re: Get store specific category in magento 2
Hello @jenny09yop1298
You can refer https://magento.stackexchange.com/questions/128547/how-to-get-category-collection-per-store-in-magen... for the solution.
Hope it helps.
Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.
200+ Magento 2 Extensions for Enhanced Shopping Experience.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2020
12:24 AM
03-16-2020
12:24 AM
@jenny09yop1298 you can check the below link once.
https://webkul.com/blog/how-to-load-store-specific-category-in-magento-2/
Hope it helps.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2020
10:05 AM
03-16-2020
10:05 AM
please use the below code:
public function __construct( \Magento\Catalog\Model\CategoryFactory $categoryFactory ) { $this->categoryFactory = $categoryFactory; } public function execute() { $category = $this->categoryFactory->create()->setStoreId(2)->load(4); //here 2 is the store id of the second store }
If it helps you, please accept it as solution and give kudos.
Regards