Zen Cart Logo
Forums / Addon Sideboxes / Categories Dressing

Categories Dressing

Views: 531,631

Results 901 to 920 of 2,268
31 Aug 2009, 6:59 AM
#901
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Categories Dressing

Images for category names are automatically picked up by the code if they are named correctly; no define statement is needed. The defines are intended for setting up headings.
From the readme:

"To display images in place of selected category names:

Make your images with names like catimg#.gif (or catbg#.gif and catbg#hover.gif), and save in /includes/templates/your_template/buttons/english/"

31 Aug 2009, 8:00 AM
#902
fierystorm avatar

fierystorm

New Zenner

Join Date:
Feb 2008
Posts:
26
Plugin Contributions:
0

Re: Categories Dressing

Hey Glenn,

I found the problem - my own fault. I had to do jpegs for a reason and changed the code in the wrong categories_dressing_define.php to take the jpegs instead of the gifs. My bad! thanks for pointing out the obvious as that helped me find out what was wrong! Thank you!!

Cheers! :clap:

31 Aug 2009, 3:00 PM
#903
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Categories Dressing

hey glenn, thanks for your reply... i will be online all day today working on the mojoleather.com site...

i will reload the file that was acting up momentarily so you can check it out... url again was:

https://www.mojoleather.com/catalog1

if it shows 'normally' check back in a few, i might not have gotten the file uploaded... computer is being slow!

i look forward to working on this with you today.. hopefully we can figure it out!

-ginny

31 Aug 2009, 3:09 PM
#904
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Categories Dressing

Still looks normal... I have to run off on an errand - back in a half hour for a few minutes. Did you install the debug utility yet? I think that will be the key to finding the problem.

Ok, now it's broken. It cuts off right after

<div id="navColumnOneWrapper" style="width: 150px">

Let me know when you have an error log entry to look at.

31 Aug 2009, 3:09 PM
#905
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Categories Dressing

ok, it is up now... and 'misbehaving' :)

31 Aug 2009, 3:11 PM
#906
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Categories Dressing

i did try the debug utility, and did not get any response from it... whatever is wrong did not 'trigger' an error.

i will be around the shop, and will check the computer every few minutes... talk to ya when you get back from your errand..

thanks for taking some time to help me with this today glenn!

you're a lifesaver as always,
ginny

31 Aug 2009, 3:44 PM
#907
nidkolio avatar

nidkolio

New Zenner

Join Date:
May 2009
Posts:
55
Plugin Contributions:
0

Re: Categories Dressing

Hi,
I have installed this mod and it is a great one!
I've menage to do everything with categories that i wanted.
However there is still one thing that i cannot find how to make it...
I search a big part of this topic if it is already posted here, but 90+ pages..
so my question is:
How i can decrease the space between the bullet(arrow/-) and the category/subcat name?
I have removed all spaces from admin->configuration->Layout Settings but there is still a lot of space between bullet and category name text.
Thank you in advance

31 Aug 2009, 7:05 PM
#908
fierystorm avatar

fierystorm

New Zenner

Join Date:
Feb 2008
Posts:
26
Plugin Contributions:
0

Re: Categories Dressing

Hey Glenn,

Thanks again for all of the help. It looks like you are getting a lot of questions :mellow: So I hate to add by asking one more but I was wondering how complicated it would be for me to configure the mod to work for other side boxes like More Information? Mostly what I am looking for is just using images in place of links again.

Thanks! The mod is awesome!

31 Aug 2009, 7:06 PM
#909
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Categories Dressing

Glenn, i missed your last reply about stopping after line:

<div id="navColumnOneWrapper" style="width: 150px">

i did not run the utility again today, but when i ran it the first day i posted the issue, i did not receive anything in the error log. it seems like its not getting to a process that would 'trigger' a log generation?

waiting for your further instructions,
ginny

31 Aug 2009, 9:30 PM
#910
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Categories Dressing

nidkolio - The list marker spacing is set by internal CSS layout and is not controllable in the current version of CSS. There have been proposals to allow setting many more aspects of lists, and it will probably be possible in a future version.

fierystorm - It would certainly be possible to adapt the code to work with other sideboxes, but you will need to be comfortable with PHP to accomplish it. I don't have time now to work on such a project, but I will give advice if you want to tackle it.

You might want to work from the Image Titles code, as that does just what you want and no extra (for other locations) and would be simpler to work with.

customk1 - Try the debug again to see if you get anything now. You might also try deliberately putting an error in a good file to see if that generates a log entry, to test whether the debug is installed correctly.

31 Aug 2009, 9:34 PM
#911
fierystorm avatar

fierystorm

New Zenner

Join Date:
Feb 2008
Posts:
26
Plugin Contributions:
0

Re: Categories Dressing

Hey Glenn,

Thanks for the reply again! I'd definitely like to tackle it :flex: and any advice you have time for that you can give me would be much appreciated.

Thanks!

31 Aug 2009, 10:49 PM
#912
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Categories Dressing

glenn, i got it to error log... actually i think it was error logging the whole time, i just wasnt looking in the right place... doh!

here is the error:

[31-Aug-2009 18:44:16] PHP Fatal error:  Call to undefined function  cat_active_level_manage() in /home/tinmann8/public_html/catalog1/includes/templates/simple_zen/sideboxes/tpl_categories.php on line 41
31 Aug 2009, 10:51 PM
#913
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Categories Dressing

here is my tpl_categories.php file... should be same as yours.. but just for the record. it seems line 41 is just a } ? dont want to go changing this file, since you wrote it... and know it a lot better. i'll wait for your reply! thanks...

<?php
/**
 * Side Box Template
 *
 * @package templateSystem
 * @copyright Copyright 2009 Glenn Herbert
 * @copyright Portions Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.gnu.org/licenses/ GNU Public License V3.0
 * @version $Id: tpl_categories.php 4162 2006-08-17 03:55:02Z ajeh $
 * Modified for Categories Dressing v2.7.3  by Glenn Herbert (gjh42)   - 20090505
 *
 * Referenced files:
 * includes/functions/extra_functions/categories_dressing_functions.php
 * includes/languages/english/extra_definitions/your_template/categories_dressing_defines.php - make user settings here
 */

  $content = "";
  $prev_cat_depth = -1;//do not alter
  $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";

  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: #categories li.cat-holiday a {}
// 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 = 'holiday';
//        break;
      case ($box_categories_array[$i]['top'] == 'true'):
        $new_style = 'top';
        break;
      case ($box_categories_array[$i]['has_sub_cat']):
        $new_style = 'subs';
        break;
      default:
        $new_style = 'products';
    }
    $current_path = str_replace("cPath=","",$box_categories_array[$i]['path']);
    $skip_cat = 0;
    $skip_cat = cat_active_level_manage($current_path);
    if ($skip_cat or zen_get_product_types_to_category($box_categories_array[$i]['path']) == 3 or ($box_categories_array[$i]['top'] != 'true' and SHOW_CATEGORIES_SUBCATEGORIES_ALWAYS != 1)) {
      // skip if this is for the document box (==3)
    } else {
      $cat_box_heading = cat_box_heading($current_path);
      $cat_ul = cat_ul_manage($current_path, $prev_cat_depth, $cat_box_heading[0]);
      $content .= $cat_ul;
      $content .= $cat_box_heading[1];
      $cat_name_display = cat_name_display($box_categories_array[$i]['name'], $current_path);
      $active_class = ($box_categories_array[$i]['current'])? ($box_categories_array[$i]['has_sub_cat']? 'parent': 'selected'): 'not-selected';
      $content .= '  <li class="cat-' . $new_style . '"><a class="cat-' . $active_class . $cat_name_display[0] . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">';
      $content .= $cat_name_display[1];
      if ($box_categories_array[$i]['has_sub_cat'] and $cat_name_display[0] == '-text') {
        $content .= CATEGORIES_SEPARATOR;
      }

      if (SHOW_COUNTS == 'true' and $cat_name_display[0] == '-text') {
        if ((CATEGORIES_COUNT_ZERO == '1' and $box_categories_array[$i]['count'] == 0) or $box_categories_array[$i]['count'] >= 1) {
          $content .= '<span class="catCount">' . CATEGORIES_COUNT_PREFIX . $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX . '</span>';
        }
      }
      $content .= '</a>';
      $content .= cat_box_subtext($current_path);
    }
  }
  $content .= cat_ul_manage(0, $prev_cat_depth, 0) . '</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 .= '<hr id="catBoxDivider" />' . "\n";
    }
    $content .= '<ul class="catLinks">' . "\n";
    if (SHOW_CATEGORIES_BOX_SPECIALS == 'true') {
      $cat_box_link_head = cat_box_heading('SPECIALS');
      $content .= $cat_box_link_head[1];
      $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) {
        $cat_box_link_head = cat_box_heading('NEW');
        $content .= $cat_box_link_head[1];
        $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) {
        $cat_box_link_head = cat_box_heading('FEATURED');
        $content .= $cat_box_link_head[1];
        $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') {
      $cat_box_link_head = cat_box_heading('ALL');
      $content .= $cat_box_link_head[1];
      $content .= '  <li><a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_ALL) . '">' . CATEGORIES_BOX_HEADING_PRODUCTS_ALL . '</a>' . '</li>' . "\n";
    }
    $content .= '</ul>' . "\n";
  }
  $content .= '</div>';
?>
1 Sep 2009, 12:15 AM
#914
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Categories Dressing

Call to undefined function

This indicates that categories_dressing_functions.php is not in the correct place, or is otherwise not working.

1 Sep 2009, 12:35 AM
#915
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Categories Dressing

i think i just realized what the problem might be...

since we are running this thru a duplicate of the site, located at /catalog1.... my guess is that the program isnt written to know to look for the files within that substructure.

if this is the case, i can think of two solutions... tell me what you think:

make a few minor changes to the code temporarily, telling it to bypass and go thru the /catalog1 before getting into templates/images etc

or, could i upload all the files EXCEPT the tpl_categories.php file to the 'regular' locations and leave the tpl_categories.php in the folder thru /catalog1

IF so, will it disrupt the regular site in any way?

awaiting your reply,
ginny

1 Sep 2009, 8:12 AM
#916
nidkolio avatar

nidkolio

New Zenner

Join Date:
May 2009
Posts:
55
Plugin Contributions:
0

Re: Categories Dressing

gjh42:

nidkolio - The list marker spacing is set by internal CSS layout and is not controllable in the current version of CSS. There have been proposals to allow setting many more aspects of lists, and it will probably be possible in a future version.
Thank you!
I will survive with this space after all...
Thanks for your great mode:clap:

1 Sep 2009, 3:21 PM
#917
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Categories Dressing

If you have a complete Zen Cart installation in /catalog1, all mod files need to be in the /catalog1 folders. It would be asking for trouble as well as very time-consuming to make temporary changes to the file lookup system. If you are not going to simply move the /catalog1 version to the root when you have made the changes but try to move the changes to the root version, you can do that by just copying the mod files after all tweaking is done.

1 Sep 2009, 3:35 PM
#918
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Categories Dressing

i do have a complete installation in /catalog1
and i have uploaded the mod to all correct files within /catalog1

i am going to try again, just to ensure i did it properly...

1 Sep 2009, 4:00 PM
#919
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Categories Dressing

ok, just reloaded the category dressing files from a fresh download...

same error

ran debug utility again, same issue on line 41

my guess is that the issue is because it is down in this subfolder /catalog1

i will ask nate if i can try a quick upload to his regular site, all i have to quickly replace the tpl_categories.php file back to the original to repair.

am i correct in understanding that the additional files will 'lay dormant' if the tpl_categories.php file is the original, not the one with the mod? (basically, will the other files conflict with anything if the mod tpl_categories.php is not in place?)

1 Sep 2009, 4:10 PM
#920
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Categories Dressing

The functions and defines files will be effectively dormant unless the mod tpl_categories file is there to use their output.
The subfolder has nothing to do with the problem - the mod operating in the subfolder installation will see that as the root.
Are you sure you have all template folder names correct?