Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Mar 2008
    Posts
    56
    Plugin Contributions
    0

    Default Re: Remove subcategory text

    Just wanted to say thanks harmeet, I searched the forum for this exact thing and your solution worked perfectly

    BIG UPS

  2. #2
    Join Date
    Apr 2008
    Posts
    4
    Plugin Contributions
    0

    Default Re: Remove subcategory text

    Hello - Im trying to get the same thing done but I cant seem to get it to work.. here is the code Im trying to use

    Code:
    <?php
    /**
     * index category_row.php
     *
     * Prepares the content for displaying a category's sub-category listing in grid format.  
     * Once the data is prepared, it calls the standard tpl_list_box_content template for display.
     *
     * @package page
     * @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: category_row.php 4084 2006-08-06 23:59:36Z drbyte $
     */
    if (!defined('IS_ADMIN_FLAG')) {
      die('Illegal Access');
    }
    $title = '';
    $num_categories = $categories->RecordCount();
    
    $row = 0;
    $col = 0;
    $list_box_contents = '';
    if ($num_categories > 0) {
      if ($num_categories < MAX_DISPLAY_CATEGORIES_PER_ROW || MAX_DISPLAY_CATEGORIES_PER_ROW == 0) {
        $col_width = floor(100/$num_categories);
      } else {
        $col_width = floor(100/MAX_DISPLAY_CATEGORIES_PER_ROW);
      }
    
      while (!$categories->EOF) {
        if (!$categories->fields['categories_image']) !$categories->fields['categories_image'] = 'pixel_trans.gif';
        $cPath_new = zen_get_path($categories->fields['categories_id']);
    
        // strip out 0_ from top level cats
        $cPath_new = str_replace('=0_', '=', $cPath_new);
    
        //    $categories->fields['products_name'] = zen_get_products_name($categories->fields['products_id']);
    
       $list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"' . ' ' . 'style="width:' . $col_width . '%;"',
      'text' => '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . zen_image(DIR_WS_IMAGES . $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br /></a>');
    
        $col ++;
        if ($col > (MAX_DISPLAY_CATEGORIES_PER_ROW -1)) {
          $col = 0;
          $row ++;
        }
        $categories->MoveNext();
      }
    }
    ?>
    I have uploaded the category_row file with no luck - Here is the site Im working on - www.1nventoryshop.com/store - When you click a category you will see the image and the link showing up under it - I want to get rid of the text/link appearing below the image, can somebody please help me? Thanks in advance!

  3. #3
    Join Date
    May 2006
    Posts
    30
    Plugin Contributions
    0

    Default Re: Remove subcategory text

    I don't see any sub-categories on your shopping cart. Only products.

    Sub-categories are 2nd level categories. Check www.mobile4u.ca, you will see that there is main category "Mobile Phones" and then there are sub-categories - "Apple", "Motorola", "Nokia", etc.

    When you click on "Mobile Phones", it expands to show sub-categories' pictures on the right. Notice, that there is no text, only logos. This is what this mod achieves.

    Hope I am clear enough.

    Thanks

  4. #4
    Join Date
    Apr 2008
    Posts
    4
    Plugin Contributions
    0

    Default Re: Remove subcategory text

    I have been trying to remove the subcategory text as well but for some reason I cannot get it to work. I have changed the category_row file and I still get the text showing up. Is it possible I need to do something else? If you visit
    www.1nventoryshop.com/store and click a category you will see my image header and the text below. Thanks for any help!

 

 

Similar Threads

  1. Remove Subcategory Pages
    By NBordeau in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 3 May 2010, 09:01 PM
  2. How to remove or add the prefix in subcategory text?
    By ttmb33 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 22 May 2009, 03:34 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