Category number

I am looking for a file / list where I would find the category number of a certain category, or preferably of all of them.



Basically, it’s $category_data.category_id



Thank you very much in advance!

The $category variable is an array returned by the PHP function fn_get_category(). It pulls the data from the database.

Is there a way to find the number of a certain category?

Or can I address the category with its name?

You need to state what you’re trying to do. The category_id is part of the $category_data variable in the category templates.



I don’t know what you mean by “address the category with its name”. Categories are an array of categories that are keyed by their category_id.

You can find them in your mysql database. Depending on what you’re trying to do, you could export the cscart_category_descriptions table. It has the category_id and category columns in it that will tell you all the IDs and names of the corresponding categories.



If you’re just looking for one category, the easiest way to get the ID is to use your admin panel. Go to Catalog > Categories, then mouse over the link to the category in question and you’ll see the ID at the end of the link. For example:

[url]https://www.domain.com/admin.php?dispatch=categories.update&category_id=[/url][COLOR=“Red”]XX[/COLOR]