Jump to content

link to the category


radhaumashankar

Recommended Posts

public static function getCategoryName($id){

$category = new Category ($id,Context::getContext()->language->id);

return $category->name;

}

 

public static function getsCategoryName($id){
    $subcategories = Category::getChildren($id,Context::getContext()->language->id);
    foreach($subcategories as $category) {
        echo $category['name']."<br>";
}
}

 

 

the above two functions display category and and subcategory names respectively by id,s.

 

now i want to link them to their category page separately for both functions .

 

any idea how to do this.

 

i have zero knowledge of coding

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...