Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / is there a way to get the variable of the main_page and ID variables in zen cart?

is there a way to get the variable of the main_page and ID variables in zen cart?

23 Jan 2011, 7:29 PM
#1
ekon79 avatar

ekon79

New Zenner

Join Date:
Jan 2011
Posts:
29
Plugin Contributions:
0

Post #1 by ekon79

I am using the latest version of zen cart. I need to be able to know that I am on main_page == 'page' and id == "17". How can I do that?
I tried using a $current_id = __GET['id'] but it doesn't seem to get anything in that variable, obviously it's not getting passed. I am trying to see if there is some function or something where I can get the values of these variables, or if I need to echo it from some file. I see that the main_template_vars.php is able to do a __GET of the main_page variable. I am trying to do the same from a custom php file under includes\modules\sideboxes.
:frusty:

23 Jan 2011, 9:42 PM
#2
ekon79 avatar

ekon79

New Zenner

Join Date:
Jan 2011
Posts:
29
Plugin Contributions:
0

Post #2 by ekon79

Alright, I got it. For anyone else looking how to resolve the same, wrap the following code around the sidebox block:

if (isset($ezpage_id) && in_array($ezpage_id,explode(",",'your_id')))
:clap: