Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Aug 2009
    Posts
    9
    Plugin Contributions
    0

    Default Male/Female category sideboxes

    Hi,

    I have been browsing these forums for a while now but a more specific question and i'm not sure how to search for it.

    The current hierarchy is Category name -> [Male/Female] -> [Male/Female] Product page.

    This is fine for the middle colum on the index page, but I want to change is the categories sidebox.

    I want to have two sideboxes (I know how to add new sideboxes), one for male and one for female. Each sidebox would list the categories that have products for the particular gender. The links would then go the products page which would list the relevant products.

    So the hierarchy would look like this: [Male/Female] Category name -> Products for [Male/Female]

    My plan is to create two new sideboxes, but I'm not sure about the specific Zen Cart variables I should be looking for to achieve this.

    In each sidebox, I want to:
    For each category, check if this category has [male/female] products.
    Create the link to that category's [male/female] page.


    I would like to know from anyone who has done this on their site, where I should be looking.

    Any help would be greatly appreciated.

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Male/Female category sideboxes

    You can use Categories Dressing to achieve the look of two sideboxes. Arrange the category sort order as you desire, with all male or all female categories first, then give the first male category a heading "Male" and start a cat group. Give the first female category a heading "Female" and start a new cat group. Style those two groups in your stylesheet to have box borders and spacing as desired, and turn off all main categories sidebox borders & heading.

  3. #3
    Join Date
    Apr 2008
    Location
    Athlone, Ireland
    Posts
    176
    Plugin Contributions
    5

    Default Re: Male/Female category sideboxes

    I use Category dressing on my new site to seperate Male/Female products. take a look here www.stapolinpartyshop.com

    The whole thing is done using images so you can mak eit look however you want if your any good with the likes of photoshop and slicing images.

  4. #4
    Join Date
    Aug 2009
    Posts
    9
    Plugin Contributions
    0

    Default Re: Male/Female category sideboxes

    Ah ok. Thanks for the link. I have installed it and have found the thread on it. I'll be taking a look at it later.

    On first glance it seems I can create a new group (say for female) with CAT_BOX_HEADING_1, but won't I still up up against the same problem in that I'll need to know the variables to determine which links to list under which gender?

  5. #5
    Join Date
    Apr 2008
    Location
    Athlone, Ireland
    Posts
    176
    Plugin Contributions
    5

    Default Re: Male/Female category sideboxes

    Not at all.

    The way I did it is I put evey category as a top category, no subcats.

    I simply used images to create headers to make it look like I had to seperate lots of cats. Which makes all the Top categories under the headers look like sub cats.

    It takes a little time to get familiar with how it works,

    What you could do is, for womens cats create WCATSNAME and for men create MCATNAME as the category names.

    If you need any help with it let just reply in this tread or PM me and I will do my best to help you out. Or at least help to take some of the confussion away. lol

  6. #6
    Join Date
    Aug 2009
    Posts
    9
    Plugin Contributions
    0

    Default Re: Male/Female category sideboxes

    But I want to keep the heirarchy of the categories as it fits with the way we are presenting our products. But in addition to that I want a different heirarchy for the sidebox. I thik that may be where my confusion comes into it.

    It may help if I showed the site (still in progress):
    http://shop.mayamada.com

    If you click at the images you'll see the category structure (we don't sell shoes by the way, just haven't switched the images yet) which I want to keep the same:

    Category->[Male/Female]->[Male/female] products

    But I want a different structure for the categories sidebox i.e. [Male/Female] Category list->[Male/Female] product list for that category.

    Is it possible to do this with Categories Dressing as it still seems to me that I'll have to make use of the variables?

    I still may be missing something though.

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Male/Female category sideboxes

    You need to know which categories are for male or female products, and give them sort orders in Catalog > Categories/Products > edit category page > sort order box at bottom left. (Say all "male" cats are sort order 1000-1990 and all "female" cats are 2000-2990.) They will then fall into place in the categories sidebox, and you can use the first one of each set to mark the group.
    If you don't want to sort the categories but let them take alphabetical order, give all male cats sort order 1 and female cats sort order 2. They will then form two sets of alphabetically-ordered cats.

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Male/Female category sideboxes

    So you want the organization of the sidebox navigation to be completely different from the organization of the actual categories. That sounds like a bad idea to start. It will also require some custom coding somewhere.

    The categories sidebox will not show individual products without applying a separate (incompatible) mod.

  9. #9
    Join Date
    Aug 2009
    Posts
    9
    Plugin Contributions
    0

    Default Re: Male/Female category sideboxes

    I'll try using the sort order method. Every top level categorey has a male and female subcategory so that will allow me to seperate between the two.

    You could be right thought and maybe it more trouble than it's worth, but I'll give it a go and find out. Ithink I'll have to replicate and extend category_row.php to only display subcategories with sort order 0 (male) and female (1).

    I found some variable documentation here by the way might be useful for someone viewing this:

    http://phpxref.com/xref/zencart/_variables/index.html

  10. #10
    Join Date
    Aug 2009
    Posts
    9
    Plugin Contributions
    0

    Default Re: Male/Female category sideboxes

    I have managed to get back to working out this problem and have come up with a solution but still need some advice.

    I have created two ezpages for male and female categories and have followed this thread to allow them to support php:

    http://www.zen-cart.com/forum/showthread.php?t=37252

    I have given all male categories a sort order of 0 and all female categories a sort order of 1.

    I am using sql to get the male and female categories for each page and am using the categories_row.php page as a template to generate the HTML to display. My code looks like this:

    PHP Code:
    $sql "SELECT * FROM zen_categories WHERE parent_id != 0 AND sort_order=1 ORDER BY parent_id ASC;";

    $categories_list $db->Execute($sql); 

    if (
    $categories_list->RecordCount() > 0) { //if categories are returned from the SQL
        
    while (!$categories_list->EOF) {
        
            
    // Female categories have a sort order of 0    
            
               // if (!$categories_list->fields['categories_image']) !$categories_list->fields['categories_image'] = 'pixel_trans.gif';
                
    $cPath_new zen_get_path($categories_list->fields['categories_id']);
            
                
    // strip out 0_ from top level cats
                
    $cPath_new str_replace('=0_''='$cPath_new);
        
        
    $list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"' ' ' 'style="width:' $col_width '%;"',
                                               
    'text' => '
                                               
            <table style="width:1px; margin:auto;" align="center";>
                <tr>
                    <td>
    <div class="img_box">
       
                                               <a href="' 
    zen_href_link(FILENAME_DEFAULT$cPath_new) . '">' zen_image(DIR_WS_IMAGES .zen_get_categories_image($categories->fields['parent_id']), $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTHSUBCATEGORY_IMAGE_HEIGHT) . '</a>
       
        </div>
        <br class="clearBoth" />
        

                                               <a href="' 
    zen_href_link(FILENAME_DEFAULT$cPath_new) . '">' $categories->fields['categories_name'] . '</a><br /><br />                    
                    </td>
                </tr>
            </table>
            <br />
    '
    );

            
    $col ++;
            if (
    $col > (MAX_DISPLAY_CATEGORIES_PER_ROW -1)) {
              
    $col 0;
              
    $row ++;
            }
            
    $categories_list->MoveNext();
        }

    I have the $list_box_contents array, but am not sure how to use it. How do I actually output the HTMl for the categories?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Custom Sideboxes - category
    By johno22 in forum Customization from the Admin
    Replies: 1
    Last Post: 28 Apr 2009, 06:06 PM
  2. multiple category sideboxes
    By JohnBoyCR in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 15 Jan 2009, 07:16 PM
  3. extra category sideboxes?
    By smithers2005 in forum Basic Configuration
    Replies: 3
    Last Post: 4 Mar 2008, 07:27 PM
  4. Multiple Category Sideboxes
    By IncrediBody.com in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 1 Aug 2007, 05:38 AM
  5. two category sideboxes
    By fakeDecoy in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 30 Apr 2007, 04:09 AM

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