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!
how to get cPath out of categories_id (without tep_get_path = db Queries)
-
- VIP Member
- Posts: 230
- Joined: Thu Mar 25, 2021 12:26 pm
- Has thanked: 7 times
- Been thanked: 3 times
Re: how to get cPath out of categories_id (without tep_get_path = db Queries)
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
$ancestors = $GLOBALS['category_tree']->get_ancestors($category_id);
and thenn make the cpath with a foreach?
thank you
-
- VIP Member
- Posts: 230
- Joined: Thu Mar 25, 2021 12:26 pm
- Has thanked: 7 times
- Been thanked: 3 times
Re: how to get cPath out of categories_id (without tep_get_path = db Queries)
I would really appreciate the best solution on how to get from the categories_id to the cPath
can somebody help me here out?
can somebody help me here out?
-
- VIP Member
- Posts: 1996
- Joined: Mon Oct 07, 2019 4:39 am
- : Buy Me A Beverage
- Has thanked: 26 times
- Been thanked: 175 times
Re: how to get cPath out of categories_id (without tep_get_path = db Queries)
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.