Thread: hideCategories

Page 32 of 49 FirstFirst ... 22303132333442 ... LastLast
Results 311 to 320 of 487
  1. #311
    Join Date
    Dec 2009
    Posts
    206
    Plugin Contributions
    2

    Default Re: hideCategories

    Quote Originally Posted by DivaVocals View Post
    Oh yes.. I'm glad you found an alternate solution (still need to test to confirm your results).. The duplicate join caused quite an issue for a few of my clients.. (I documented the issue) I REALLY didn't want to have to restore that code..
    We're all glad you didn't have to restore that code - it would have been really messy. Hopefully the code I borrowed from the sidebox code in the mod will hold up in the search function. (fingers crossed)

    Quote Originally Posted by DivaVocals View Post
    Well I'm glad I could be of some small amount of help.. Would love to know what I said that was funny though..
    Sorry - can't recall specific posts. Although a couple of them were your responses to when you took the time to help someone and they just posted "fixed it"; even with your rather prominent signature. People just crack me up.

  2. #312
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: hideCategories

    Quote Originally Posted by kamelion0927 View Post
    We're all glad you didn't have to restore that code - it would have been really messy. Hopefully the code I borrowed from the sidebox code in the mod will hold up in the search function. (fingers crossed)
    Me too.. I think your code will be just fine.. My apologies for the delay in testing.. Hoping to do it and a lot of other stuff I need to do this weekend..



    Quote Originally Posted by kamelion0927 View Post
    Sorry - can't recall specific posts. Although a couple of them were your responses to when you took the time to help someone and they just posted "fixed it"; even with your rather prominent signature. People just crack me up.
    People are indeed funny!!
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  3. #313
    Join Date
    Dec 2009
    Posts
    206
    Plugin Contributions
    2

    Default Re: hideCategories

    Quote Originally Posted by DivaVocals View Post
    Me too.. I think your code will be just fine.. My apologies for the delay in testing.. Hoping to do it and a lot of other stuff I need to do this weekend..
    It's all good - not an imperative issue. Take your time, I know you'll get to it when you can.

  4. #314
    Join Date
    Dec 2007
    Location
    Belfast, N.Ireland
    Posts
    96
    Plugin Contributions
    0

    Default Re: hideCategories

    I may have messed up merging the files on my already modified site, or it could be the fact that I have put this mod onto a earlier version of ZenCart but, has anyone else noticed the following issue?

    I installed the mod, and all is well, except I have lost the ability to give my categories a 'sort order'.

    When I went into each category after installing, to save it as visible or hidden, I had no way of stating a sort order, and it saved each category sort order as '0'.

    I have it on V139d instead of the latest as I am working on the latest version with a few other changes, but haven't got it in a place for going live as yet.

    I was just wondering it I have messed up, or has anyone else noticed this?

    Thanks,

    Paul

  5. #315
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: hideCategories

    If you took a look through this support thread you would have seen that that this issue has never been reported. Leads me to conclude that you have done something incorrect in your merging..

    Quote Originally Posted by ardhill View Post
    I may have messed up merging the files on my already modified site, or it could be the fact that I have put this mod onto a earlier version of ZenCart but, has anyone else noticed the following issue?

    I installed the mod, and all is well, except I have lost the ability to give my categories a 'sort order'.

    When I went into each category after installing, to save it as visible or hidden, I had no way of stating a sort order, and it saved each category sort order as '0'.

    I have it on V139d instead of the latest as I am working on the latest version with a few other changes, but haven't got it in a place for going live as yet.

    I was just wondering it I have messed up, or has anyone else noticed this?

    Thanks,

    Paul
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  6. #316
    Join Date
    Dec 2007
    Location
    Belfast, N.Ireland
    Posts
    96
    Plugin Contributions
    0

    Default Re: hideCategories

    I don't doubt that it was my doing as I had my 6mth old at the same time as reading install instruction and merging files. Bouncing baby and reading instructions, feeding baby and opening win merge, playing with baby and finding differences in code etc...

    Never a great combination, but needs must when you are a Daddy of a young baby.

    I remember the day when I used to have spare time to concentrate on stuff like this

    But, I thought I would ask as it is possible that something hadn't been noticed in the mod. You can't be expected to see all the issues yourself.

  7. #317
    Join Date
    Jun 2011
    Posts
    2
    Plugin Contributions
    0

    Default Re: hideCategories

    i have a noob problem, i installed and its working great, my problem is that this changed the style of the box on my site (mycrystale.com)

    if you look at the "Choose Your Color" page, you will see what it used to look like... i would like the new box with the hidden categories to look the same as this page..... any thoughts?

  8. #318
    Join Date
    Jun 2011
    Posts
    2
    Plugin Contributions
    0

    Default Re: hideCategories

    Here is my current php files..... help please

    Quote Originally Posted by crkone View Post
    i have a noob problem, i installed and its working great, my problem is that this changed the style of the box on my site (mycrystale.com)

    if you look at the "Choose Your Color" page, you will see what it used to look like... i would like the new box with the hidden categories to look the same as this page..... any thoughts?
    old tpl_categories.php
    PHP Code:
    <?php 
    /** 
     * Side Box Template 
     * 
     * @package templateSystem 
     * @copyright Copyright 2003-2006 Zen Cart Development Team 
     * @copyright Portions Copyright 2003 osCommerce 
     * @license [url]http://www.zen-cart.com/license/2_0.txt[/url] GNU Public License V2.0 
     * @version $Id: tpl_categories.php 4162 2006-08-17 03:55:02Z ajeh $ 
     */ 
      
    $content ""
       
      
    $content .= '<div id="' str_replace('_''-'$box_id 'Content') . '" class="sideBoxContent">' "\n"
      
    $content .= '<ul>' "\n"
       
      
    $li_class=""
      
    $levels = array(); 
       
      
    $j 0
      foreach(
    $main_category_tree->tree as $key => $value){ 
          for (
    $i=0;$i<sizeof($box_categories_array);$i++){ 
            if(
    $box_categories_array[$i]['path'] == 'cPath=' $value['path']){ 
                
    $levels[$i] = $value['level']; 
            } 
        } 
        
    $j++; 
      } 
      for (
    $i=0;$i<sizeof($box_categories_array);$i++) { 

           
        switch(
    true) { 
    // to make a specific category stand out define a new class in the stylesheet example: A.category-holiday 
    // uncomment the select below and set the cPath=3 to the cPath= your_categories_id 
    // many variations of this can be done 
    //      case ($box_categories_array[$i]['path'] == 'cPath=3'): 
    //        $new_style = 'category-holiday'; 
    //        break; 

             
             
             
          
    case ($box_categories_array[$i]['top'] == 'true'): 
                  if(
    $i == 0
                { 
                 
                 
            
    $new_style 'category-top_un'
            
    $li_class='<li class="category-top_un"><span class="top-span">'
            break; 
                     
                } 
                 
                else{ 

           
            
    $new_style 'category-top'
            
    $li_class='<li class="category-top"><span class="top-span">'
            break; 
            } 
          case (
    $box_categories_array[$i]['has_sub_cat']): 
            
    $new_style 'category-subs'
            
    $li_class='<li class="category-subs" style="padding-left:' 15 * ($levels[$i]) . 'px"><span class="top-span">'
            break; 
          default: 
            
    $new_style 'category-products'
            
    $li_class='<li class="category-products" style="padding-left:' 15 * ($levels[$i]) . 'px"><span class="top-span">'
            break; 
             
          } 
           
         if (
    zen_get_product_types_to_category($box_categories_array[$i]['path']) == or ($box_categories_array[$i]['top'] != 'true' and SHOW_CATEGORIES_SUBCATEGORIES_ALWAYS != 1)) { 
            
    // skip if this is for the document box (==3) 
          
    } else { 
          
    $content .= $li_class
           
          
    $content .= '<a class="' $new_style '" href="' zen_href_link(FILENAME_DEFAULT$box_categories_array[$i]['path']) . '">'

          if (
    $box_categories_array[$i]['current']) { 
            if (
    $box_categories_array[$i]['has_sub_cat']) { 
              
    $content .= '<span class="category-subs-parent-selected">' $box_categories_array[$i]['name'] . CATEGORIES_SEPARATOR '</span>'
            } else { 
              
    $content .= '<span class="category-subs-selected">' $box_categories_array[$i]['name'] . '</span>'
            } 
          } else { 
              if (
    $box_categories_array[$i]['has_sub_cat']) { 
              
    $content .= '<span class="category-subs-parent">' $box_categories_array[$i]['name'] . CATEGORIES_SEPARATOR .'</span>'
            } else
            
    $content .= $box_categories_array[$i]['name']; 
          } 

          
          
    $content .= '</a>'

          if (
    SHOW_COUNTS == 'true') { 
            if ((
    CATEGORIES_COUNT_ZERO == '1' and $box_categories_array[$i]['count'] == 0) or $box_categories_array[$i]['count'] >= 1) { 
              
    $content .= CATEGORIES_COUNT_PREFIX $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX
            } 
          } 
           
          
    $content .= '</span></li>'
        } 
      } 
          
    $content .= '</ul>' "\n"

      if (
    SHOW_CATEGORIES_BOX_SPECIALS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true' or SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') { 

    // display a separator between categories and links 
        
    if (SHOW_CATEGORIES_SEPARATOR_LINK == '1') { 
          
    $content .= '<div id="catBoxDivider"></div>' "\n"
        } 
         
         
    $content .= '<div class="box_body_2"><ul>';  
         
         
        if (
    SHOW_CATEGORIES_BOX_SPECIALS == 'true') { 
          
    $show_this $db->Execute("select s.products_id from " TABLE_SPECIALS " s where s.status= 1 limit 1"); 
          if (
    $show_this->RecordCount() > 0) { 
            
    $content .= '<li><a class="category-links" href="' zen_href_link(FILENAME_SPECIALS) . '">' CATEGORIES_BOX_HEADING_SPECIALS '</a></li>' "\n"
          } 
        } 
         
        if (
    SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true') { 
          
    // display limits 
    //      $display_limit = zen_get_products_new_timelimit(); 
          
    $display_limit zen_get_new_date_range(); 

          
    $show_this $db->Execute("select p.products_id 
                                     from " 
    TABLE_PRODUCTS " p 
                                     where p.products_status = 1 " 
    $display_limit " limit 1"); 
          if (
    $show_this->RecordCount() > 0) { 
            
    $content .= '<li><a class="category-links" href="' zen_href_link(FILENAME_PRODUCTS_NEW) . '">' CATEGORIES_BOX_HEADING_WHATS_NEW '</a></li>' "\n"
          } 
        } 
         
        if (
    SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true') { 
          
    $show_this $db->Execute("select products_id from " TABLE_FEATURED " where status= 1 limit 1"); 
          if (
    $show_this->RecordCount() > 0) { 
            
    $content .= '<li><a class="category-links" href="' zen_href_link(FILENAME_FEATURED_PRODUCTS) . '">' CATEGORIES_BOX_HEADING_FEATURED_PRODUCTS '</a></li>' "\n"
          } 
        } 
         
        if (
    SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') { 
          
    $content .= '<li><a class="category-links" href="' zen_href_link(FILENAME_PRODUCTS_ALL) . '">' CATEGORIES_BOX_HEADING_PRODUCTS_ALL '</a></li>' "\n"
        } 
         
        
    $content .= '</ul></div>';  
         
      } 
      
    $content .= '</div>'
    ?>

    new tpl_categories.pho
    PHP Code:
    <?php
    /**
     * Side Box Template
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_categories.php 4162 2006-08-17 03:55:02Z ajeh $
     */
      
    $content "";
      
      
    $content .= '<div id="' str_replace('_''-'$box_id 'Content') . '" class="sideBoxContent">' "\n";
      for (
    $i=0;$i<sizeof($box_categories_array);$i++) {
    //  Begin hideCategories code
        
    list($nada$mycpath)= split('='$box_categories_array[$i]['path']);
        
    $mycid split('_'$mycpath);
        
    $categories_id array_pop($mycid);
        
    $hide_status $db->Execute("select visibility_status 
                        FROM " 
    TABLE_HIDE_CATEGORIES "
                        WHERE categories_id = " 
    $categories_id "
                        LIMIT 1"
    );
        if (
    $hide_status->fields['visibility_status'] < 1) {
    //  End hideCategories code
        
    switch(true) {
    // to make a specific category stand out define a new class in the stylesheet example: A.category-holiday
    // uncomment the select below and set the cPath=3 to the cPath= your_categories_id
    // many variations of this can be done
    //      case ($box_categories_array[$i]['path'] == 'cPath=3'):
    //        $new_style = 'category-holiday';
    //        break;
          
    case ($box_categories_array[$i]['top'] == 'true'):
            
    $new_style 'category-top';
            break;
          case (
    $box_categories_array[$i]['has_sub_cat']):
            
    $new_style 'category-subs';
            break;
          default:
            
    $new_style 'category-products';
          }
         if (
    zen_get_product_types_to_category($box_categories_array[$i]['path']) == or ($box_categories_array[$i]['top'] != 'true' and SHOW_CATEGORIES_SUBCATEGORIES_ALWAYS != 1)) {
            
    // skip if this is for the document box (==3)
          
    } else {
          
    $content .= '<a class="' $new_style '" href="' zen_href_link(FILENAME_DEFAULT$box_categories_array[$i]['path']) . '">';

          if (
    $box_categories_array[$i]['current']) {
            if (
    $box_categories_array[$i]['has_sub_cat']) {
              
    $content .= '<span class="category-subs-parent">' $box_categories_array[$i]['name'] . '</span>';
            } else {
              
    $content .= '<span class="category-subs-selected">' $box_categories_array[$i]['name'] . '</span>';
            }
          } else {
            
    $content .= $box_categories_array[$i]['name'];
          }

          if (
    $box_categories_array[$i]['has_sub_cat']) {
            
    $content .= CATEGORIES_SEPARATOR;
          }
          
    $content .= '</a>';

          if (
    SHOW_COUNTS == 'true') {
            if ((
    CATEGORIES_COUNT_ZERO == '1' and $box_categories_array[$i]['count'] == 0) or $box_categories_array[$i]['count'] >= 1) {
              
    $content .= CATEGORIES_COUNT_PREFIX $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX;
            }
          }

          
    $content .= '<br />' "\n";
        }
      }
      } 
    //  hideCategories code
      
    if (SHOW_CATEGORIES_BOX_SPECIALS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true' or SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
    // display a separator between categories and links
        
    if (SHOW_CATEGORIES_SEPARATOR_LINK == '0') {
          
    $content .= '<hr id="catBoxDivider" />' "\n";
        }
        if (
    SHOW_CATEGORIES_BOX_SPECIALS == 'true') {
          
    $show_this $db->Execute("select s.products_id from " TABLE_SPECIALS " s where s.status= 1 limit 1");
          if (
    $show_this->RecordCount() > 0) {
            
    $content .= '<a class="category-links" href="' zen_href_link(FILENAME_SPECIALS) . '">' CATEGORIES_BOX_HEADING_SPECIALS '</a>' '<br />' "\n";
          }
        }
        if (
    SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true') {
          
    // display limits
    //      $display_limit = zen_get_products_new_timelimit();
          
    $display_limit zen_get_new_date_range();

          
    $show_this $db->Execute("select p.products_id
                                     from " 
    TABLE_PRODUCTS " p
                                     where p.products_status = 1 " 
    $display_limit " limit 1");
          if (
    $show_this->RecordCount() > 0) {
            
    $content .= '<a class="category-links" href="' zen_href_link(FILENAME_PRODUCTS_NEW) . '">' CATEGORIES_BOX_HEADING_WHATS_NEW '</a>' '<br />' "\n";
          }
        }
        if (
    SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true') {
          
    $show_this $db->Execute("select products_id from " TABLE_FEATURED " where status= 1 limit 1");
          if (
    $show_this->RecordCount() > 0) {
            
    $content .= '<a class="category-links" href="' zen_href_link(FILENAME_FEATURED_PRODUCTS) . '">' CATEGORIES_BOX_HEADING_FEATURED_PRODUCTS '</a>' '<br />' "\n";
          }
        }
        if (
    SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
          
    $content .= '<a class="category-links" href="' zen_href_link(FILENAME_PRODUCTS_ALL) . '">' CATEGORIES_BOX_HEADING_PRODUCTS_ALL '</a>' "\n";
        }
      }
      
    $content .= '</div>';
    ?>

  9. #319
    Join Date
    Dec 2007
    Location
    Belfast, N.Ireland
    Posts
    96
    Plugin Contributions
    0

    Default Re: hideCategories

    Hi crkone

    Did you just copy all the files from the Hide Categories mod into your site?

    It looks like you did, in which case you will have overwritten your existing files with the ones supplied in this mod.

    The problem with that is that you will loose all you custom code - the stuff that mades your site look and operate as it does.

    With any mod, unless they are extra files that do not exist already in your site, you need to compare the code in each file with the ones you already have in your site. When you find the bits that the mod author has modified/added then you copy these 'parts' into your existing files. You either just copy and add the bits to the appropraite place, or sometimes use them to replace existing code.

    Personally I use a programme called WinMerge to help me find the differences in the code. You can download it free for a windows pc.

    Because you already had a file with the same name in your custom folder, you should have found the changed code in the mod, then added that to your existing php page.

    For instance, in the file that you mention, the following code needed to be found in the mod, then copied to the appropriate place in your existing page (I put some line breaks round it to stand out on here for you):

    Code:
    <?php
    /**
     * Side Box Template
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_categories.php 4162 2006-08-17 03:55:02Z ajeh $
     */
      $content = "";
      
      $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";
      for ($i=0;$i<sizeof($box_categories_array);$i++) {
    
    
    
    
    //  Begin hideCategories code
        list($nada, $mycpath)= split('=', $box_categories_array[$i]['path']);
        $mycid = split('_', $mycpath);
        $categories_id = array_pop($mycid);
        $hide_status = $db->Execute("select visibility_status 
        				FROM " . TABLE_HIDE_CATEGORIES . "
        				WHERE categories_id = " . $categories_id . "
        				LIMIT 1");
        if ($hide_status->fields['visibility_status'] < 1) {
    //  End hideCategories code
    
    
    
    
        switch(true) {
    // to make a specific category stand out define a new class in the stylesheet example: A.category-holiday
    // uncomment the select below and set the cPath=3 to the cPath= your_categories_id
    // many variations of this can be done
    //      case ($box_categories_array[$i]['path'] == 'cPath=3'):
    //        $new_style = 'category-holiday';
    //

    There is some details on how customisation of zen cart works here:
    http://www.zen-cart.com/wiki/index.php/Customisation

    I hope this helps,

    Paul

  10. #320
    Join Date
    Feb 2008
    Posts
    15
    Plugin Contributions
    0

    Default Re: hideCategories

    I just installed this mod and checked everything twice. All the files are in the places they are supossed to be I have loaded the sql through admin, by copying it and pasting it in. I have opened and resaved my catagorys, and even created a new one to try that. But I get nothing different than what was there before I installed the mod. No icons, no choice to make hidden nothing new??

    I did not however install the optional files in folder 2 because it did say they were optional and I do not need what they would do.

    I am using zen 1.3.9h

    Thanks so much for any help in advance

 

 
Page 32 of 49 FirstFirst ... 22303132333442 ... LastLast

Similar Threads

  1. how to get hidecategories an dual pricing to work
    By davidweaver88 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 4 Jun 2012, 03:35 PM
  2. anyone using HideCategories in 1.3.9d??
    By redheads in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 8 Jun 2010, 06:54 AM
  3. HideCategories problem...
    By ShadowAngel in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 10 Nov 2009, 10:17 PM
  4. hideCategories Module
    By marcusimages in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 25 Aug 2009, 06:31 PM

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