how to get cPath String from categories_id (without query db)

Open to all! Ask other shopowners for help.
Post Reply
loop
Contributor
Posts: 253
Joined: Thu Mar 25, 2021 12:26 pm
Phoenix Version:
Has thanked: 7 times
Been thanked: 3 times

how to get cPath String from categories_id (without query db)

Post by loop »

Hi All
i want to have the complete cPath from the categories_id and i'm wondering if that's possible, without use function tep_get_path($current_category_id = '')

I need a solution to use in productlisting, to have a link back to the according category and i do not want to query for every link the DB (that would create to much DB traffic)

thank you in advance!


Join The Code Co-op to get access to your library in the Code Co-op Forum
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: how to get cPath String from categories_id (without query db)

Post by ecartz »

Code: Select all

$category_tree->find_path($category_id)
loop
Contributor
Posts: 253
Joined: Thu Mar 25, 2021 12:26 pm
Phoenix Version:
Has thanked: 7 times
Been thanked: 3 times

Re: how to get cPath String from categories_id (without query db)

Post by loop »

Perfect, thank you!


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply