Zen Cart Logo
Forums / Addon Sideboxes / Categories Dressing

Categories Dressing

Views: 531,610

Results 1,821 to 1,840 of 2,268
19 Jul 2011, 2:45 PM
#1821
gjh42 avatar

gjh42

Black Belt

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

Categories Dressing

Why are you trying to call tpl_categories.php from tpl_header.php? It is a sidebox mod which works with existing sidebox files, and will not work in the header without significant tweaking and additional files.

What exactly do you want to accomplish?

19 Jul 2011, 2:49 PM
#1822
skinnyo avatar

skinnyo

New Zenner

Join Date:
Jul 2011
Posts:
4
Plugin Contributions:
0

Re: Categories Dressing

Well, I've used other sideboxes succesfully in header before, didn't this would be that much different. I stand corrected. I try to accomplis a dynamic categories menu (horizonta) that lists all categories and has drop downs for subcategories.

With this mode I would've been easy to use custom css and styles to do the dropdown.

19 Jul 2011, 3:02 PM
#1823
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

Some sideboxes may function by the tpl_ file calling the module file, but the categories box does not. You might be able to require /includes/modules/sideboxes/categories.php which would then call up tpl_categories.php. I haven't investigated what other dependencies there are that might be disrupted by using the box outside a sidebar. This line needs $column_box_default to be defined, which may not be the case in the header:```php
require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);

19 Jul 2011, 3:09 PM
#1824
skinnyo avatar

skinnyo

New Zenner

Join Date:
Jul 2011
Posts:
4
Plugin Contributions:
0

Re: Categories Dressing

Ok, I understand. I have actually used the module with a custom tpl to get categories, but haven tried to get sub categories with the same code - a bit changed of course.

Well, I reckon, I try something else to get the job done.

19 Jul 2011, 10:02 PM
#1825
tparvaiz avatar

tparvaiz

Zen Follower

Join Date:
Jun 2011
Posts:
150
Plugin Contributions:
0

Re: Categories Dressing

Hi,

I've recently installed Categories Dressing on my zencart...

apparently it split my categories into groups/sub-groups and added some other functions that I don't want on my website...

here is what I need to do

  1. group categories back together
  2. delete minor headings
  3. delete unwanted text

can you please advice how to accoumplish the above...

I've attacehd a snapshot of my categories box for your review and comments

Thanks

20 Jul 2011, 4:56 AM
#1826
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

The readme.html has complete instructions for removing demo features that you don't want. Look at the bold paragraphs at the bottom of various sections.

20 Jul 2011, 6:46 AM
#1827
tparvaiz avatar

tparvaiz

Zen Follower

Join Date:
Jun 2011
Posts:
150
Plugin Contributions:
0

Re: Categories Dressing

gjh42,

I was able to apply some customization through categories_dressing_defines.php

I am still struggling with the following

  1. Move a category after the text
  2. how to change category shown as an image back to regular link

I've attached a snapshot to further explain my requirements

Thanks

20 Jul 2011, 1:14 PM
#1828
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

To remove the demo image, comment out the define for CAT_BOX_HEADING_3.

If you got the Sub Category heading by defining it for the Miscellaneous category, just change the define to use the id of the Combinations... category. I can't be more specific without seeing your site live.

20 Jul 2011, 4:25 PM
#1829
tparvaiz avatar

tparvaiz

Zen Follower

Join Date:
Jun 2011
Posts:
150
Plugin Contributions:
0

Re: Categories Dressing

gjh42,

I've already commented out CAT_BOX_HEADING_3 (actually I've commented out everything except for CAT_BOX_SUBTEXT_23) in categories_dressing_defines.php file but the icon is still there...

Plus I am still struggling to group products before and after CAT_BOX_SUBTEXT_23 text...

my website is gPakistan.com... Please review and advice

Thanks again for all your assistance I really appreciate it...

20 Jul 2011, 4:55 PM
#1830
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

Oops, sorry about the CAT_BOX_HEADING_3... I wasn't thinking about what it is (a category name replacement, not a heading image). The way to get rid of that is to delete the relevant image from /includes/templates/your_template/buttons/english/.

">Combinations...</a><div class="catBoxSubtext1">Sub Category</div></li>So you defined the Sub Category as subtext, not as a heading. If you want it above the Combinations... link, you need to change the define to be a heading.```php
define ('CAT_BOX_HEADING_23','0|0|||Sub Category|2');//no list break or divider - text heading - style 2

20 Jul 2011, 5:38 PM
#1831
tparvaiz avatar

tparvaiz

Zen Follower

Join Date:
Jun 2011
Posts:
150
Plugin Contributions:
0

Re: Categories Dressing

by deleting catimg3.gif, should I be able to see my category as a regular link and not as an image...?

Thanks

20 Jul 2011, 7:30 PM
#1832
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

That's what I said:)

21 Jul 2011, 7:04 AM
#1833
tparvaiz avatar

tparvaiz

Zen Follower

Join Date:
Jun 2011
Posts:
150
Plugin Contributions:
0

Re: Categories Dressing

gjh42,

It worked... Thanks

21 Jul 2011, 7:06 AM
#1834
tparvaiz avatar

tparvaiz

Zen Follower

Join Date:
Jun 2011
Posts:
150
Plugin Contributions:
0

Re: Categories Dressing

when I roll my mouse over a category it shows some dashes at the top and dots at the bottom of the category to highlight the selection...

may I know how to disable it...?

thnaks

21 Jul 2011, 7:18 AM
#1835
tparvaiz avatar

tparvaiz

Zen Follower

Join Date:
Jun 2011
Posts:
150
Plugin Contributions:
0

Re: Categories Dressing

never mind... I found the solution for it...

I commented out hover effects in stylesheet_categories_dressing.css file

Thanks

22 Jul 2011, 7:19 PM
#1836
sweetemotions avatar

sweetemotions

Zen Follower

Join Date:
Apr 2008
Posts:
100
Plugin Contributions:
0

Re: Categories Dressing

I just had this installed on my site, I did not do the install. When I check my site on Internet Explorer http://www.lotionsgalore.com/ , it shows the pink color rather then the yellow that was added and the dividers are also missing. When I view the site https://www.lotionsgalore.com/ , with http(s), is shows correctly! How can I fix this so http://www.lotionsgalore.com shows correctly?

3 Aug 2011, 3:36 PM
#1837
buildingblocks avatar

buildingblocks

Totally Zenned

Join Date:
Jun 2008
Posts:
629
Plugin Contributions:
0

Re: Categories Dressing

Hi

Categories dressing is installed and working without problems on a 139h cart. It's set up to hide the top category.

These are the settings being used.

define ('CAT_BOX_HEADING_32_10','1|0|||Frames|1');//new list - text headings - multiple levels - styles 1 & 2

define('CAT_BOX_ACTIVE_LEVEL', '0|1|1');//hide top cats

The majority of categories have sub categories.

My question:

How do we get a category to show if it will never be having any sub-categories?

9 Aug 2011, 7:02 PM
#1838
t_harrison avatar

t_harrison

New Zenner

Join Date:
Aug 2005
Posts:
16
Plugin Contributions:
0

Re: Categories Dressing

I have Template Monster template (theme490) which I read in this thread that could be an issue with tpl_categories.php and getting this mod to work. All I want to do is have the top level categories have background images w/ hover. No subcats or anything else. I have uploaded my images and updated stylesheet_categories_dressing.php to reference the images. Below is my tpl_categories code. Can someone please tell me how to make this mod work with Template Monster as well as how to configure categories_dressing_defines.php? My categories are simply 1-6.

<?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"; $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']) == 3 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>'; ?>
15 Aug 2011, 6:40 PM
#1839
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

t.harrison - You have a customized tpl_categories.php from the TM template, which has totally different code from the Categories Dressing version. They cannot be used together; you have to use one or the other. There would be no point in merging them, since they do some of the same things in different ways. If you want the whole category link to change appearance on hover, you would have to use Cat Dressing. If you just want the background to change on hover and not the text, you might be able to style the TM elements. That would be a subject for a new thread, as it is off topic for this thread.

15 Aug 2011, 6:45 PM
#1840
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

buildingblocks - You might make your lone category into a subcategory of a "dummy" top cat, but that would have repercussions elsewhere in the page display. The best way would be to edit categories_dressing_functions.php and add a new case to the switch that mimics case 1 with the addition of a test to handle your special category. That is the outline of the approach; I could work up the exact code to use if you need more help.