Page 1 of 1

how to get cPath out of categories_id (without tep_get_path = db Queries)

Posted: Wed Sep 29, 2021 1:58 pm
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!

Re: how to get cPath out of categories_id (without tep_get_path = db Queries)

Posted: Thu Sep 30, 2021 8:11 am
by loop
or ist the best way to use:
$ancestors = $GLOBALS['category_tree']->get_ancestors($category_id);
and thenn make the cpath with a foreach?

thank you

Re: how to get cPath out of categories_id (without tep_get_path = db Queries)

Posted: Tue Oct 05, 2021 5:36 am
by loop
I would really appreciate the best solution on how to get from the categories_id to the cPath
can somebody help me here out?

Re: how to get cPath out of categories_id (without tep_get_path = db Queries)

Posted: Tue Oct 05, 2021 6:18 am
by heatherbell
loop wrote: Tue Oct 05, 2021 5:36 am can somebody help me here out?
One of the benefits of being a Pro Supporter is that you can post questions in the VIP PRO Supporters forum where help and support direct from the Core Developers is available. Maybe they can help.

Re: how to get cPath out of categories_id (without tep_get_path = db Queries)

Posted: Tue Oct 05, 2021 6:40 am
by loop
ok, will do that (i thought the pro supporters forum is only for the addons)