Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2008
    Posts
    1,336
    Plugin Contributions
    1

    Default Adding content to side box

    Hello
    Iam trying to add a new side box to display the top categories as seperate side boxes. I started the testing on one Categorie on my site www.coolcarpartsonline.com Categorie "Performance Parts" ID 239. I was able to get hide the category from the categories sidebox. and Now trying to add content to the New Sidebox to display the Performance parts Categorie. The code I added in the performance_sidebox (I changed the name of the blank_sidebox)

    PHP Code:
    PHP Code:
    <?php 
    /** 
     * blank sidebox - allows a blank sidebox to be added to your site 
     * 
     * @package templateSystem 
     * @copyright 2007 Kuroi Web Design 
      * @copyright Portions Copyright 2003-2007 Zen Cart Development Team 
     * @license [url]http://www.zen-cart.com/license/2_0.txt[/url] GNU Public License V2.0 
     * @version $Id: blank_sidebox.php 2007-05-26 kuroi $ 
     */ 
    /************* 
    stuff Sami added to use more performance box 
    ******************/ 
      
    $categories_query_ap "select c.categories_id, cd.categories_name, c.parent_id, c.categories_image 
                                 from categories c, categories_description cd 
                                 where c.categories_id = cd.categories_id  
                                 and c.categories_status = 1  
                                 and c.parent_id = 239 
                                 order by sort_order, cd.categories_name"


        
    $categories_ap $db->Execute($categories_query_ap''true150); 
         
        
    $add_content =''
         
        while (!
    $categories_ap->EOF)  { 
            
    $id $categories_ap->fields['categories_id']; 
            
    $name $categories_ap->fields['categories_name']; 
              
    $add_content .= '<li><a href="index.php?main_page=index&cPath='.$id.'" class="category-top">'.$name.'</a></li>' "\n"
             
            
    $categories_ap->MoveNext(); 
        } 
         
        unset(
    $name); 
         
    /**************** 
    end of additions 
    ********************/ 
      // test if box should display 
      
    $show_performance_sidebox true

      if (
    $show_performance_sidebox == true) { 
          require(
    $template->get_template_dir('tpl_performance_sidebox.php',DIR_WS_TEMPLATE$current_page_base,'sideboxes'). '/tpl_performance_sidebox.php'); 
          
    $title =  BOX_HEADING_PERFORMANCE_SIDEBOX
          
    $title_link false
          require(
    $template->get_template_dir($column_box_defaultDIR_WS_TEMPLATE$current_page_base,'common') . '/' $column_box_default); 
     } 
    ?>
    I edited the following files:
    category_tree
    tpl_categories
    tpl_main_page
    Plus the files that came with the blank_sidebox Mod.
    The sidebox appears on the site Iam just trying to tweak the code to have the content of the Performance Parts Side Box.

  2. #2
    Join Date
    Feb 2008
    Posts
    1,336
    Plugin Contributions
    1

    Default Re: Adding content to side box

    I figured it out If anyone needs the solution let me know PM me

 

 

Similar Threads

  1. Blank Side box.... content
    By macc88 in forum Basic Configuration
    Replies: 5
    Last Post: 14 Nov 2009, 08:00 PM
  2. How do I change content in right side box
    By Lone Writer in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 24 Sep 2008, 04:57 PM
  3. Adding side box content to pages outside the zen cart
    By ksolito in forum General Questions
    Replies: 2
    Last Post: 7 Jun 2008, 06:55 AM

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