Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Oct 2008
    Posts
    378
    Plugin Contributions
    0

    Default Category Images Not Showing

    Hi, I am struggling as to why my category images will not display. I am using the Bana template but have had no joy in getting the answer from the template designer.

    Would someone be able to tell me if there is something missing in the template for category listings as found here https://25a.co.uk/index.php?main_page=index&cPath=4

    Thanks in advance

  2. #2
    Join Date
    Oct 2008
    Posts
    378
    Plugin Contributions
    0

    Default Re: Category Images Not Showing

    I have looked at the code in tpl_index_categories.php

    Mine has this

    <?php
    if (PRODUCT_LIST_CATEGORIES_IMAGE_STATUS == 'true') {
    // categories_image
    if ($categories_image = zen_get_categories_image($current_category_id)) {
    ?>
    <div class="cover">
    <?php echo zen_image(DIR_WS_IMAGES . $categories_image, ''); ?>
    </div>
    <?php
    }
    } // categories_image
    ?>
    <h1 id="indexCategoriesHeading" class="page-title"><?php echo $breadcrumb->last(); ?></h1>
    <?php } ?>

    I have tried changing it to this (from one of my other sites) but it did not work either

    <?php
    if (PRODUCT_LIST_CATEGORIES_IMAGE_STATUS_TOP == 'true') {
    // categories_image
    if ($categories_image = zen_get_categories_image($current_category_id)) {
    ?>

    <div id="categoryImgListing" class="categoryImg"><?php echo zen_image(DIR_WS_IMAGES . $categories_image, '', SUBCATEGORY_IMAGE_TOP_WIDTH, SUBCATEGORY_IMAGE_TOP_HEIGHT); ?></div>


    <?php
    }
    } // categories_image
    ?>

  3. #3
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,009
    Plugin Contributions
    61

    Default Re: Category Images Not Showing

    Are you certain they are uploaded? Present in the database? There is not a single reference in the generated code for a category image... Which would be odd if they exist.

    ~Melanie
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

  4. #4
    Join Date
    Oct 2008
    Posts
    378
    Plugin Contributions
    0

    Default Re: Category Images Not Showing

    Yes they do exist, uploaded in admin and seen in admin for each categoryClick image for larger version. 

Name:	catimg.jpg 
Views:	72 
Size:	23.6 KB 
ID:	17857
    Last edited by Congerman; 21 May 2018 at 04:43 PM.

  5. #5
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,221
    Plugin Contributions
    1

    Default Re: Category Images Not Showing

    Quote Originally Posted by Congerman View Post
    I have looked at the code in tpl_index_categories.php

    Mine has this

    <?php
    if (PRODUCT_LIST_CATEGORIES_IMAGE_STATUS == 'true') {
    // categories_image
    if ($categories_image = zen_get_categories_image($current_category_id)) {
    ?>
    <div class="cover">
    <?php echo zen_image(DIR_WS_IMAGES . $categories_image, ''); ?>
    </div>
    <?php
    }
    } // categories_image
    ?>
    <h1 id="indexCategoriesHeading" class="page-title"><?php echo $breadcrumb->last(); ?></h1>
    <?php } ?>

    I have tried changing it to this (from one of my other sites) but it did not work either

    <?php
    if (PRODUCT_LIST_CATEGORIES_IMAGE_STATUS_TOP == 'true') {
    // categories_image
    if ($categories_image = zen_get_categories_image($current_category_id)) {
    ?>

    <div id="categoryImgListing" class="categoryImg"><?php echo zen_image(DIR_WS_IMAGES . $categories_image, '', SUBCATEGORY_IMAGE_TOP_WIDTH, SUBCATEGORY_IMAGE_TOP_HEIGHT); ?></div>


    <?php
    }
    } // categories_image
    ?>
    I think the code you've shown is for category images on a product listing page (which are in turn activated in Admin>Configuration>Product Listing>'Include Product Listing Sub Categories Image' & 'Include Product Listing Top Categories Image'). From your link, that's not the page displayed.

    The code controlling category images on a 'category listing' page is in includes\modules\YOUR_TEMPLATE\category_row.php (if it's not there it will be at includes\modules\category_row.php

    Code:
    $list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"' . ' ' . 'style="width:' . $col_width . '%;"',
                                               'text' => '<h3><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) . '' . $categories->fields['categories_name'] . '</a></h3>');
    You could check and see if the code is present/complete.

  6. #6
    Join Date
    Oct 2008
    Posts
    378
    Plugin Contributions
    0

    Default Re: Category Images Not Showing

    ok, that file is not in my template overide so it must be using the default which has this.

    $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 />' . $categories->fields['categories_name'] . '</a>');

    see grab of folder structure
    Attached Images Attached Images  

  7. #7
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,221
    Plugin Contributions
    1

    Default Re: Category Images Not Showing

    I'm afraid I'm sure what else to suggest at this point.

  8. #8
    Join Date
    Oct 2008
    Posts
    378
    Plugin Contributions
    0

    Default Re: Category Images Not Showing

    Thanks for looking

  9. #9
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,009
    Plugin Contributions
    61

    Default Re: Category Images Not Showing

    Have you tried switching to the default template?

    ~Melanie
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

  10. #10
    Join Date
    Oct 2008
    Posts
    378
    Plugin Contributions
    0

    Default Re: Category Images Not Showing

    I know that it is template related as it has the same behaviour on all of my sites that use the Bana template.

    Was just trying to find a way to fix it in this template before going down the route of yet another template and all the language and other associated bits that will need sorting by doing that.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Category Images Not Showing Up
    By atomiksteve in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 16 Nov 2011, 04:27 AM
  2. category images not showing
    By derek53 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 19 Sep 2010, 03:36 PM
  3. Category images not showing
    By mcpisik in forum General Questions
    Replies: 2
    Last Post: 1 Jul 2010, 12:54 AM
  4. Category images not showing up
    By inkuyo in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 14 Nov 2007, 07:48 PM

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