Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2006
    Posts
    13
    Plugin Contributions
    0

    Category Picture shows on Left Box

    I have customized the main page, and want to show the category icon (picture) on the left column box, can anyone show me how to do so?

    Also, is it possible that the category icon shows on the left box with 2 column?

    i capture the screen to explain what I want, thank you very much.





    -jojohi

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Category Picture shows on Left Box

    Getting an image to display is the easy issue. But instead of telling you how to do this image thing, think this through. After you have an image displayed like yours that has A,B,C, etc. you now need this to function.

    And that is the hard part as each letter will have to be an individual image so that one can assign a function to it. This will require more explanation than there is space for here.

    If you definitely require this and can not do the coding yourself. You might consider obtaining paid assistance in the commercial section.
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jun 2006
    Posts
    13
    Plugin Contributions
    0

    Default Re: Category Picture shows on Left Box

    Quote Originally Posted by kobra
    Getting an image to display is the easy issue. But instead of telling you how to do this image thing, think this through. After you have an image displayed like yours that has A,B,C, etc. you now need this to function.

    And that is the hard part as each letter will have to be an individual image so that one can assign a function to it. This will require more explanation than there is space for here.

    If you definitely require this and can not do the coding yourself. You might consider obtaining paid assistance in the commercial section.
    thanks, i just quote an example, the ABC is actually the defined category name, as I want to draw some category picture icon and show it on the left sidebox, thanks.

    -jojohi

  4. #4
    Join Date
    Jun 2006
    Posts
    13
    Plugin Contributions
    0

    Default Re: Category Picture shows on Left Box

    This is the tpl_categories.php file I have, can anyone advise how I can do?

    <?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 3157 2006-03-10 23:24:22Z drbyte $
    */
    $content = "";

    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 .= '<tr><td><img src=images/m19.gif width=5 height=5></td><td> &nbsp;<a class=ml1 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 .= $box_categories_array[$i]['name'];
    } else {
    $content .= $box_categories_array[$i]['name'];
    }
    } 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><br class=px2></td></tr><tr><td colspan=2><img src=images/m20.gif width=151 height=1><br><br class=px2></td></tr>';
    }
    }

    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";
    }
    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();

    $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>';
    ?>

 

 

Similar Threads

  1. Left sidebox's category picture are the same
    By chaiavi in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 11 Dec 2010, 11:25 PM
  2. Category Box floats down left column
    By mitch_h in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 8 Feb 2009, 01:53 AM
  3. Left side box and category problem
    By backgarden-co in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 27 Oct 2008, 04:11 PM
  4. How to Remove Top Margin space in Left Category Box
    By cevans73 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 15 Aug 2008, 04:36 PM
  5. Sent E mail shows X in upper left box
    By boston in forum General Questions
    Replies: 1
    Last Post: 22 Jul 2006, 09:51 AM

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