Jump to content

[1.7] Get current category object


tumil

Recommended Posts

Hi!

I need to assign object from the current category to a smarty variable but I can't find a proper function. Is there such a function or can I do it somehow? All I could find was getRootCategory() and getTopCategory() but that's not what I want. Can I get it somehow by id?

$category returns an array instead of an object so it's not good :/

You know:

{assign var='root_cat' value=Category::getRootCategory(Context::getContext()->language->id)}

Something like this but not the root category (the current category instead).

I would really appreciate some help

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...