Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2011
    Posts
    29
    Plugin Contributions
    0

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

    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.

  2. #2
    Join Date
    Jan 2011
    Posts
    29
    Plugin Contributions
    0

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

    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')))

 

 

Similar Threads

  1. v154 Naming a global variable the same as a SESSION, GET or POST variable
    By torvista in forum General Questions
    Replies: 5
    Last Post: 6 Dec 2015, 11:11 AM
  2. Replies: 0
    Last Post: 26 Nov 2014, 01:51 AM
  3. Is there a way to Disable the Shopping Cart ...
    By jibbyprog in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 7 Oct 2010, 04:55 PM
  4. Replies: 25
    Last Post: 24 Jul 2009, 10:57 PM
  5. Can I Copy and paste the zen cart to get two sites?
    By ElBasha in forum General Questions
    Replies: 15
    Last Post: 4 Jun 2009, 03:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg