Page 21 of 25 FirstFirst ... 111920212223 ... LastLast
Results 201 to 210 of 249
  1. #201
    Join Date
    May 2005
    Location
    England
    Posts
    626
    Plugin Contributions
    0

    Default Re: Simple Category Tree

    Hello yellow1912

    I would be interested in this new version please. I am trying to achieve a flyout header (which I managed with your over version). And also a sidebox which gets the cpath and display the subcategories under that cpath / master category. I struggled on that, but I know it was my PHP knowledge that failed. lol.

    Thanks,

    Heathenmagic

  2. #202
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Simple Category Tree

    Quote Originally Posted by HeathenMagic View Post
    Hello yellow1912

    I would be interested in this new version please. I am trying to achieve a flyout header (which I managed with your over version). And also a sidebox which gets the cpath and display the subcategories under that cpath / master category. I struggled on that, but I know it was my PHP knowledge that failed. lol.

    Thanks,

    Heathenmagic
    Here you go. Warning: I have changed class function/method names a bit, so peek into the class for more info.
    Attached Files Attached Files
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  3. #203
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Simple Category Tree

    Just writing to say a big thank you for the "all_sub_cats_products" mod. I just installed it and it worked an absolute treat, first time around with zero glitches. PERFECTO!!

    Why isn't this available to download in the main downloads area?! It's too useful not to be!!

  4. #204
    Join Date
    Apr 2005
    Location
    Louny, Czech Republic
    Posts
    51
    Plugin Contributions
    1

    Default Re: Simple Category Tree

    Hi yellow1912, nice module. But in center column not showing navigation (name sub-category or image) for others subcategories. Is possibility their display?
    JardaR

  5. #205
    Join Date
    Jan 2009
    Location
    Czech Republic
    Posts
    59
    Plugin Contributions
    0

    Default Re: Simple Category Tree

    Quote Originally Posted by ryska View Post
    Hi yellow1912, nice module. But in center column not showing navigation (name sub-category or image) for others subcategories. Is possibility their display?
    In file "/includes/templates/YOURTEMPLATE/templates/tpl_index_product_list.php" find this line:
    <?php } // categories_description ?>
    BELOW this line, paste the following code :
    PHP Code:
    <!-- BOF: Display grid of available sub-categories, if any -->
    <?php
      
    if (PRODUCT_LIST_CATEGORY_ROW_STATUS == 0) {
        
    // do nothing
      
    } else {
        
    // display subcategories
    /**
     * require the code to display the sub-categories-grid, if any exist
     */
       
    require($template->get_template_dir('tpl_modules_category_row.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_category_row.php');
      }
    ?>
    <!-- EOF: Display grid of available sub-categories -->
    In file "/includes/modules/pages/index/main_template_vars.php" find this line:
    $tpl_page_body = 'tpl_index_product_list.php';
    ABOVE this line, paste the following code :
    PHP Code:
        /* ---------------- BOF - THIS MAKES SUB-CATS WORK -------------------- */
          
    $sql "SELECT cd.categories_name, c.categories_image
                  FROM   " 
    TABLE_CATEGORIES " c, " TABLE_CATEGORIES_DESCRIPTION " cd
                  WHERE      c.categories_id = :categoriesID
                  AND        cd.categories_id = :categoriesID
                  AND        cd.language_id = :languagesID
                  AND        c.categories_status= '1'"
    ;
        
          
    $sql $db->bindVars($sql':categoriesID'$current_category_id'integer'); 
          
    $sql $db->bindVars($sql':languagesID'$_SESSION['languages_id'], 'integer'); 
          
    $category $db->Execute($sql);
        
          if (isset(
    $cPath) && strpos($cPath'_'))
          {
            
    // check to see if there are deeper categories within the current category
            
    $category_links array_reverse($cPath_array);
            for(
    $i=0$n=sizeof($category_links); $i<$n$i++)
            {
              
    $sql "SELECT count(*) AS total
                      FROM   " 
    TABLE_CATEGORIES " c, " TABLE_CATEGORIES_DESCRIPTION " cd
                      WHERE      c.parent_id = :parentID 
                      AND        c.categories_id = cd.categories_id
                      AND        cd.language_id = :languagesID
                      AND        c.categories_status= '1'"
    ;
        
              
    $sql $db->bindVars($sql':parentID'$category_links[$i], 'integer'); 
              
    $sql $db->bindVars($sql':languagesID'$_SESSION['languages_id'], 'integer'); 
              
    $categories $db->Execute($sql);
        
              if (
    $categories->fields['total'] < 1)
              {
                
    // do nothing, go through the loop
              
    } else {
                
    $categories_query "SELECT c.categories_id, cd.categories_name, c.categories_image, c.parent_id
                                     FROM   " 
    TABLE_CATEGORIES " c, " TABLE_CATEGORIES_DESCRIPTION " cd
                                     WHERE      c.parent_id = :parentID
                                     AND        c.categories_id = cd.categories_id 
                                     AND        cd.language_id = :languagesID 
                                     AND        c.categories_status= '1' 
                                     ORDER BY   sort_order, cd.categories_name"
    ;
        
                
    $categories_query $db->bindVars($categories_query':parentID'$category_links[$i], 'integer');
                
    $categories_query $db->bindVars($categories_query':languagesID'$_SESSION['languages_id'], 'integer'); 
                break; 
    // we've found the deepest category the customer is in
              
    }
            }
          } else {
            
    $categories_query "SELECT c.categories_id, cd.categories_name, c.categories_image, c.parent_id
                                 FROM   " 
    TABLE_CATEGORIES " c, " TABLE_CATEGORIES_DESCRIPTION " cd
                                 WHERE      c.parent_id = :parentID
                                 AND        c.categories_id = cd.categories_id
                                 AND        cd.language_id = :languagesID
                                 AND        c.categories_status= '1'
                                 ORDER BY   sort_order, cd.categories_name"
    ;
        
            
    $categories_query $db->bindVars($categories_query':parentID'$current_category_id'integer');
            
    $categories_query $db->bindVars($categories_query':languagesID'$_SESSION['languages_id'], 'integer'); 
          }
          
    $categories $db->Execute($categories_query);
          
    $number_of_categories $categories->RecordCount();
          
    $new_products_category_id $current_category_id;  
          
        
    /* ---------------- EOF - THIS MAKES SUB-CATS WORK -------------------- */ 
    This modification was based on bodyjewelrystores code. I haven´t had problems with displaying names of sub-category or image. I hope it will solve your problem.

  6. #206
    Join Date
    Apr 2005
    Location
    Louny, Czech Republic
    Posts
    51
    Plugin Contributions
    1

    Default Re: Simple Category Tree

    to neboztik: Thanx, I have a look in it.
    JardaR

  7. #207
    Join Date
    Jan 2009
    Location
    Czech Republic
    Posts
    59
    Plugin Contributions
    0

    Default Re: Simple Category Tree

    Hi, I used my code listed above and I have one big problem. When I click on manufacture link it brings me on the main page instead of products manufacture listing. Can smb help?

  8. #208
    Join Date
    Dec 2008
    Posts
    18
    Plugin Contributions
    0

    Default Re: Simple Category Tree

    So I ran into an interesting problem. I have installed the "all_sub_cats_products" mod, and it works wonderfully. However I noticed one little problem...

    I added two new sub categories today, and the products don't show up as they are supposed to. I am not sure what to do. The site is also on local host, which is another issue so I can't post a link .

    I'd appreciate if anyone can guide me in the right direction on how to get my new products to show up.

  9. #209
    Join Date
    Sep 2009
    Posts
    49
    Plugin Contributions
    0

    Default Re: Simple Category Tree

    Does anyone else get this error after uploading the autoloader?

    [28-Oct-2009 00:40:35] PHP Fatal error: Call to a member function init() on a non-object in /home/xyz.com/zen/includes/autoload_func.php on line 90

  10. #210
    Join Date
    Feb 2007
    Posts
    513
    Plugin Contributions
    2

    help question Re: Simple Category Tree

    Hello,
    I and 5 other people I have seen in the forum are looking for a way to list sub category products in the main category.

    I added the simple_categories_tree.php and config.simple_categories_tree.php from yellow1912's list zip file
    http://www.zen-cart.com/forum/showpo...&postcount=204

    Can anyone tell me what else I have to do to list all products of each subcategory when click main category ?

    P.s. I did not get an error when I added these files, but that is all I did(add these files).

 

 
Page 21 of 25 FirstFirst ... 111920212223 ... LastLast

Similar Threads

  1. Category Tree
    By fneergaard in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 13 Aug 2010, 11:42 PM
  2. Redesigning Category Tree
    By moomo in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 30 Dec 2009, 01:53 PM
  3. Category tree
    By ner0tik in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 10 Aug 2006, 02:19 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR