Zen Cart Logo
Forums / Addon Sideboxes / Categories Dressing

Categories Dressing

Views: 531,642

Results 1,661 to 1,680 of 2,268
16 Feb 2011, 3:44 PM
#1661
nicktrini avatar

nicktrini

New Zenner

Join Date:
May 2010
Location:
Trinidad & Tobago
Posts:
6
Plugin Contributions:
0

Categories Dressing

hehe I did notice that and realized afterwards. That's when I tried my version of the 'selected' class.

Thanks again!

16 Feb 2011, 3:53 PM
#1662
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

A correction: :active applies while the mouse is being clicked, not just after, as this Sitepoint tutorial explains:

This pseudo-class matches any element that’s in the process of being activated. It would apply, for instance, for the duration of a mouse-click on a link, from the point at which the mouse button’s pressed down until the point at which it’s released again. The pseudo-class does not signify a link to the active, or current, page—that’s a common misconception among CSS beginners.

16 Feb 2011, 3:59 PM
#1663
nicktrini avatar

nicktrini

New Zenner

Join Date:
May 2010
Location:
Trinidad & Tobago
Posts:
6
Plugin Contributions:
0

Re: Categories Dressing

hehe yup. Ok I have one more minor issue....does this not work for categories that have sub categories?

Like for instance, on my local server, i created a 6th category called dudes222, with subcats tees, tanks, accesssories, shorts (assuming that in the near future i expand the brand and sub-categorize the stuff).

the catBg# and catBg#hover works fine, but not the a.cat-selected.catBg# (it works on all other categories, just not the one with subcategories).

Any solution to this?

16 Feb 2011, 4:23 PM
#1664
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

a.cat-selected applies to final categories. Categories with subcats get the .cat-parent class if they are in the selection path.
You would allow for this by adding another selector to the rule:

#categories li a.cat-selected.catBg2, #categories li a.cat-parent.catBg2

16 Feb 2011, 4:27 PM
#1665
nicktrini avatar

nicktrini

New Zenner

Join Date:
May 2010
Location:
Trinidad & Tobago
Posts:
6
Plugin Contributions:
0

Re: Categories Dressing

Awesome.

Thanks a bunch again.

17 Feb 2011, 3:26 PM
#1666
macbain avatar

macbain

New Zenner

Join Date:
Feb 2011
Posts:
63
Plugin Contributions:
0

Re: Categories Dressing

Hi i have inherited three sites which i have found out are linked using zen cart multi site add on but one of the sites is different than the others is it possible to edit the category box other than in Zen Cart admin in categories/products ie is there a file in the ftp where you can edit the names of the categories so that it is individual to this site :unsure:

the sites are : happiechappie.com
gaysexstores.co.uk
happieladies.com

please be aware these are adult sites :smile:

thanks
Marie

17 Feb 2011, 4:18 PM
#1667
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

That really depends on the setup of the Multisite mod, which I know nothing about. There should be some information in a support thread for it. There is nothing in admin for a standard ZC that specifically controls which categories show in the sidebox - all active categories are there. It would be possible to manually edit tpl_categories.php, but you would have to maintain that by hand every time a category changes - not a good solution.
Good luck - sorry I can't be more help.

17 Feb 2011, 5:12 PM
#1668
macbain avatar

macbain

New Zenner

Join Date:
Feb 2011
Posts:
63
Plugin Contributions:
0

Re: Categories Dressing

Hi thank you for your reply not sure where to change it or what to change it to :(

this is the admin file in tpl_categories.php :

<?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 $ * * BetterCategoriesEzInfo v1.3.5 added 2006-09-19 gilby */ $spacer = ''; // uncomment next line to add 1 space between image & text // $spacer .= ' '; $content = ""; $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: 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']) == 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 .= '<div class="betterCategories"><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">'; $content .= cat_with_pointer($box_categories_array[$i]['name'], 'down', $spacer); $content .= '</span>'; } else { $content .= '<span class="category-subs-selected">'; $content .= cat_with_pointer($box_categories_array[$i]['name'], 'nosub', $spacer); $content .= '</span>'; } } else { if ($box_categories_array[$i]['has_sub_cat']) { $content .= cat_with_pointer($box_categories_array[$i]['name'], 'right', $spacer); } else { $content .= cat_with_pointer($box_categories_array[$i]['name'], 'nosub', $spacer); } } 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 .= '</a></div>'; } } 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 .= '<br />' . zen_draw_separator('pixel_silver.gif') . '<br />'; // $content .= '<hr id="catBoxDivider" />' . "\n"; $content .= '<br style="line-height: 0;" />' . '<hr id="catBoxDivider" />' . '<br style="line-height: 0;" />'; } 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 .= '<div class="betterCategories"><a class="category-links" href="' . zen_href_link(FILENAME_SPECIALS) . '">'; $content .= CATEGORIES_BOX_HEADING_SPECIALS . '</a></div>'; } } 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 .= '<div class="betterCategories"><a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_NEW) . '">'; $content .= CATEGORIES_BOX_HEADING_WHATS_NEW . '</a></div>'; } } 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 .= '<div class="betterCategories"><a class="category-links" href="' . zen_href_link(FILENAME_FEATURED_PRODUCTS) . '">'; $content .= CATEGORIES_BOX_HEADING_FEATURED_PRODUCTS . '</a></div>'; } } if (SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') { $content .= '<div class="betterCategories"><a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_ALL) . '">'; $content .= CATEGORIES_BOX_HEADING_PRODUCTS_ALL . '</a></div>'; } } //this is the function that inserts the 'pointer' (or 'disclosure triangle') //before the name of the category, in the 'Categories' sidebox. //$categoryName should be a string as contained in //$box_categories_array[$i]['name'] above, which already includes //the category name with all the necessary subcategory indents up front, //as specified by the user in the Admin Panel. //$categoryType will be either 'down', 'right' or 'nosub', which //specifies which picture appears next to the category name: function cat_with_pointer( $categoryName, $categoryType, $spacer) { //picking the appropriate pointer image: switch ($categoryType) { case "down": break; case "right": break; default: } $pointer .= $spacer; switch (true) { //if the user has left the 'subcategories indent' empty, or //if this is a 'top-level' category (there are no subcategory indents), //then, we just prepend the pointer image: case (CATEGORIES_SUBCATEGORIES_INDENT == ''): case (strpos($categoryName, CATEGORIES_SUBCATEGORIES_INDENT) !== 0): $pointer .= $categoryName; break; default: //removing the subcategory indents from the beginning of the name: $indentLength = strlen(CATEGORIES_SUBCATEGORIES_INDENT); $pos = 0; for ($i = 0; $pos === 0; $i++) { $categoryName = substr($categoryName, $indentLength); $pos = strpos($categoryName, CATEGORIES_SUBCATEGORIES_INDENT); } //placing the pointer image: $pointer .= $categoryName; //adding back the subcategory indents to the beginning of the name: for (;$i > 0; $i--) { $pointer = CATEGORIES_SUBCATEGORIES_INDENT . $pointer; } } return $pointer; } $content .= '</div>'; ?>

I have spoke to someone else about splitting the multi sites as they are all controlled off of one zen cart admin but they all have different ftp files but they say that this is not possible so i am trying to find a way around the problem :frusty:

thanks in advance

Marie

17 Feb 2011, 5:22 PM
#1669
kdub avatar

kdub

New Zenner

Join Date:
Jan 2011
Posts:
12
Plugin Contributions:
0

Re: Categories Dressing

are there basic instructions for this all i want to do is replace the link text in the side boxes for images??

17 Feb 2011, 6:34 PM
#1670
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

The basic instructions are in the readme.html packed with the mod files.
Look for the heading

To display images in place of selected category names:

17 Feb 2011, 6:42 PM
#1671
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

You have BetterCategoriesEzInfo v1.3.5, so what you are asking about is not only unrelated to Categories Dressing, it needs to be applied to another mod's version (by gilby) of tpl_categories.php. I'm afraid I really can't help, as I don't know how files are organized under the Multisite mod, nor how the sites are distinguished within it. Does each site have a template folder of its own?

18 Feb 2011, 7:30 AM
#1672
msgok avatar

msgok

New Zenner

Join Date:
May 2006
Posts:
41
Plugin Contributions:
0

Re: Categories Dressing

In the HTML readme file it says:

You will probably want to adjust categories settings in your Admin > Configuration > Layout Settings as detailed under "To display images in place of selected category names:", and at the bottom of this page.

I went to the lay out settings and did not see "To display images" down at the bottom of the page. I installed all the files in their correct places. I checked a few times to make sure, but I still do not see "To display images" in the layout settings.

18 Feb 2011, 8:29 AM
#1673
macbain avatar

macbain

New Zenner

Join Date:
Feb 2011
Posts:
63
Plugin Contributions:
0

Re: Categories Dressing

Hi

each site has its own ftp and within that two sites are under one template name zct adult and lingerie 16 and the other(happieladies.com) has one named zct adult and lingerie 01 but in zen cart admin there is only one !!

I also dont know anything about multi site or why you would do this :frusty: if i could break them apart i would but have been told i cant do this so am trying to figure out another way of changing the ladies site so as the categories are not for men :smile:

many thanks
Marie

18 Feb 2011, 2:47 PM
#1674
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

MSGOK - Change admin settings "as detailed in the readme"; the mentioned sections of the readme describe the admin settings to make. If you skimmed down the whole readme you would have seen this. I know it's long, but there are a lot of functions to describe. That's why I made it HTML with big section headings.

macbain - The ftp accounts/users have nothing to do with template names. The whole point of using Multisite is to keep inventory and management integrated, while presenting different faces for different markets. My impression was that you could use different templates for the different sites, but I have no direct knowledge of the mod.

21 Feb 2011, 9:46 AM
#1675
macbain avatar

macbain

New Zenner

Join Date:
Feb 2011
Posts:
63
Plugin Contributions:
0

Re: Categories Dressing

ok what about another route ?

can i build a new site for happieladies on a temp url using a new template from zen cart and then upload over the top of the orignal happie ladies site ? or would the multi site link still be in operation ?

thanks
Marie :smile:

22 Feb 2011, 1:02 AM
#1676
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

Sorry, this is not the right thread to be discussing multisite problems and solutions. I don't know about them, those who do will not be likely to see your questions here, and neither will other people who have similar questions.

22 Feb 2011, 6:23 AM
#1677
gromit1977 avatar

gromit1977

New Zenner

Join Date:
Feb 2011
Posts:
21
Plugin Contributions:
0

Re: Categories Dressing

sorry i am not very good at CSS but been trying to get my picture in catergories heading and remove the text but i cant seen to get it to work, please may i get some of your help

.catBoxHeading3 {
background: #383E44;
background: url(../images/arrows/bull.png) 99% no-repeat;
height: 50px;
text-align:left;
padding-left: 20px;
font-size: 0em;
border-bottom: 0px solid #000000;
color: #000000;
}

my site is https://www.GUNANDSURPLUS.com

25 Feb 2011, 5:22 PM
#1678
macbain avatar

macbain

New Zenner

Join Date:
Feb 2011
Posts:
63
Plugin Contributions:
0

Re: Categories Dressing

Hi

I seem to have alot of space between my categories and sub categories where does this come from ?

I got rid of the category count is that what has caused the space if so how do i get rid of it ?

https://www.happiechappie.com

thanks
Marie

25 Feb 2011, 5:58 PM
#1679
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

You don't currently have Categories Dressing installed on your site, but the stylesheet is still there, and this may be causing some glitches.

In particular, you have the category links as display: block; and the <br /> after each category causes the extra space.
Try this:

a.category-top+br {display: none;}

You should delete stylesheets that you are not using so they don't interfere with the others.

25 Feb 2011, 6:04 PM
#1680
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

gromit1977 - The .catBoxHeading3 selector will not apply to any of your categories, nor to the sidebox heading as you seem to want. It appears that you have found a way to get the sideboxes to have the bullet image in place of the text in the heading.