Go to solution. New Contributor. Category id in product list. Hi, I'm trying to show category ids or names in product list , because i'm developing an ajax layered navigation system. Using Magento CE 2. Labels: CE 2. All forum topics Previous Topic Next Topic. Accepted Solutions. Re: Category id in product list. Bhanu Periwal wrote: Hi webmastercb You need some customisation with page. M2 Certified. Object manager is now the more effective method to acquire the current category detail in Magento 2.
Read on to learn how to access current category ID in Magento The afore-shared example will provide you the current category details. You can access other details similar to what we have displayed the category id and name. Let our certified Magento experts know if you have any query.
Communication is the key for us to understand each other. Allow us to understand your requirements or queries. Present us with an opportunity to serve you. Fill out the form and out team will get back to you within 24 hours.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously. The cookie is used to store the user consent for the cookies in the category "Analytics". The cookie is used to store the user consent for the cookies in the category "Other. The cookies is used to store the user consent for the cookies in the category "Necessary". The cookie is used to store the user consent for the cookies in the category "Performance".
It does not store any personal data. Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features. Teja Bhagavan Kollepara 3, 5 5 gold badges 27 27 silver badges 62 62 bronze badges. From what I know, you cannot. Marius too sad, I need that all the time.
I understand your frustration. I needed something like this a lot of times. Maybe it helps for now. And if you implement a search for categories, put it on github :. Add a comment. Active Oldest Votes. Largely untested, so please adjust as needed. Improve this answer. ProxiBlue ProxiBlue 9, 3 3 gold badges 30 30 silver badges 59 59 bronze badges. I will test it next week — nbar. Thanks for this code ProxiBlue! I got sick of trying to find what category had a particular ID so this was a nearly perfect solution even worked without changes on Magento 1.
I also fiddled around with it until I realised I could do a store switch without switching stores, which selects the category AND updates the tree.
0コメント