Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / Get category name of linked product

Get category name of linked product

Started by perfumbg on 26 Jun 2013, 6:01 PM · Views: 503

Results 1 to 3 of 3
26 Jun 2013, 6:01 PM
#1
perfumbg avatar

perfumbg

Zen Follower

Join Date:
May 2010
Posts:
192
Plugin Contributions:
5

Post #1 by perfumbg

Hello,

I cant find the function that calls the name of linked product category.
Now i'm using this function

zen_get_categories_name((int)$current_category_id);

and it works if I am on the products original page, but when I am on the linked products product_info page the linked category name does NOT apear.

for example:

original page linked page

Thanks a lot.

My most recent work: magprom.net

26 Jun 2013, 7:15 PM
#2
perfumbg avatar

perfumbg

Zen Follower

Join Date:
May 2010
Posts:
192
Plugin Contributions:
5

Post #2 by perfumbg

The truth is that i have a code that strips non english characters, and this is the problem.
Now I am looking for a solution abbout how to show stripped category names on NON LINKED Products category and NON striped category names for linked products category.

The only thing that comes in my mind is to somehow use the parameters in the linked products...

if ($_GET["main_page"]=="product_info"?cPath=???){non striped zen_get_categories_name((int)$current_category_id);}

elseif ($_GET["main_page"]=="product_info"){striped zen_get_categories_name((int)$current_category_id);}

But i dont know hoh to call the parameters. Any sugestions?

My most recent work: magprom.net

26 Jun 2013, 8:18 PM
#3
perfumbg avatar

perfumbg

Zen Follower

Join Date:
May 2010
Posts:
192
Plugin Contributions:
5

Post #3 by perfumbg

this made the trick

if (($current_page_base == 'product_info') and ((in_array($cPath,explode(",",'133,122'))) or strpos($cPath, '134_') === 0)){non striped zen_get_categories_name((int)$current_category_id);}

but because i dont have much categories and i manualy include them :) if you do have many ... this wont be of much help.

My most recent work: magprom.net