Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004
    Posts
    167
    Plugin Contributions
    0

    Default help finding Category Variable please :)

    I am coding a basic category counting feature (like products_viewed but for categories). I have created a new field in the categories table called categories viewed and basically added this code to the main_template_vars.php file:

    // new to count category views
    $sql = "update " . TABLE_CATEGORIES . "
    set categories_viewed = categories_viewed+1
    where categories_id = '" . WHAT_VARIABLE_GOES_HERE . "'";

    $res = $db->Execute($sql);
    //eof new


    I need to know which variable uses the respective category id. I have tried $cPath but that gives the category tree, I just want the actual category id - any ideas from those that know Zen Cart inside out?

    Any help would be much appreciate as that is the only missing link I need :)

  2. #2
    Join Date
    Jul 2004
    Posts
    167
    Plugin Contributions
    0

    Default Re: help finding Category Variable please :)

    Booyakashah............ $current_category_id is the badboy needed

 

 

Similar Threads

  1. v151 php help please - set variable based on items on order
    By philip937 in forum General Questions
    Replies: 11
    Last Post: 13 Aug 2014, 07:27 PM
  2. finding a needle in a haystack - please help
    By tracyselena in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 10 Dec 2007, 05:29 AM
  3. need help please finding the center box wrapper
    By graphx in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 16 Mar 2007, 08:25 PM
  4. Help finding my stylesheet.css files please
    By angelicdezigns in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 30 Jun 2006, 10:46 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