Menu Close
    Hire us Request quote Reading list Switch to dark mode
    lockdownWebkulUp

    How to load Store specific Category in Magento 2

    In Magento 2 you can set category data such as name, description different for each store view. In this blog I will explain how you can load store specific category or how you can get the category data per store.

    For example I have created a category with name “New Category” and set the name as “Latest Category” for second store.

    When I loaded the category and printed the data, it has default data as shown below,

     

    To get the data for a specific store in our case second store we need to use setStoreId($storeId) method as in the below code.


    Now when we check the data it will show the data set for second store,

    . . .
    Subscribe Articles

    Just enter your email below to subscribe and receive weekly updates about the most interesting similar articles.

    You need to accept conditions to receive letters.
    You've Subscribed!

    Share article via

    . . .

     

     

    In the same way we can load the whole collection of category for a specific store,


    Thank you for checking this blog.

    Please let me know if you find any issue.

    . . .

    Comment

    Add Your Comment

    Be the first to comment.

    Back to Top
    css.php
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just recieved your project brief and our expert will contact you shortly.
    Send Again
    Close