Results 1 to 5 of 5
  1. #1

    Default Making featured sidebox image smaller

    How can I make the featured sidebox image smaller?
    Rich People scream, Wealthy people whisper

    www.cooltechcentral.com

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Making featured sidebox image smaller

    If you look in the tpl_featured.php sidebox template you will see the line:
    PHP Code:
        $content .=  '<a href="' zen_href_link(zen_get_info_page($random_featured_product->fields["products_id"]), 'cPath=' zen_get_generated_category_path_rev($random_featured_product->fields["master_categories_id"]) . '&products_id=' $random_featured_product->fields["products_id"]) . '">' zen_image(DIR_WS_IMAGES $random_featured_product->fields['products_image'], $random_featured_product->fields['products_name'], SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT); 
    That is using the settings for SMALL_IMAGE_WIDTH and SMALL_IMAGE_HEIGHT ...

    These settings are used for ALL small images so you would want to make your own settings there if you need to reduce them further ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3

    Default Re: Making featured sidebox image smaller

    Quote Originally Posted by Ajeh View Post
    If you look in the tpl_featured.php sidebox template you will see the line:
    PHP Code:
        $content .=  '<a href="' zen_href_link(zen_get_info_page($random_featured_product->fields["products_id"]), 'cPath=' zen_get_generated_category_path_rev($random_featured_product->fields["master_categories_id"]) . '&products_id=' $random_featured_product->fields["products_id"]) . '">' zen_image(DIR_WS_IMAGES $random_featured_product->fields['products_image'], $random_featured_product->fields['products_name'], SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT); 
    That is using the settings for SMALL_IMAGE_WIDTH and SMALL_IMAGE_HEIGHT ...

    These settings are used for ALL small images so you would want to make your own settings there if you need to reduce them further ...
    Thanks again for all your help. Unfortunately when I made the image smaller the image ended up displayed over the product name. I am trying to figure out how to make the image align like it is in my best sellers sidebox but without the underline which I modified:

    www.cooltechcentral.com

    tpl_featured.php

    <?php
    /**
    * Side Box Template
    *
    * @package templateSystem
    * @copyright Copyright 2003-2007 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_featured.php 6128 2007-04-08 04:53:32Z birdbrain $
    */
    $content = "";
    $content .= '<div class="sideBoxBorder">';
    $featured_box_counter = 0;
    while (!$random_featured_product->EOF) {
    $featured_box_counter++;
    $featured_box_price = zen_get_products_display_price($random_featured_product->fields['products_id']);

    $content .= '<div class="featuredSideboxContent">';
    $content .= '<a href="' . zen_href_link(zen_get_info_page($random_featured_product->fields["products_id"]), 'cPath=' . zen_get_generated_category_path_rev($random_featured_product->fields["master_categories_id"]) . '&products_id=' . $random_featured_product->fields["products_id"]) . '">' . zen_image(DIR_WS_IMAGES . $random_featured_product->fields['products_image'], $random_featured_product->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, ' hspace="0" vspace="0" align="left"');
    $content .= '<br />' . $random_featured_product->fields['products_name'] . '</a>';
    $content .= '<div><b class="boldred">' . $featured_box_price . '</b></div>';
    $content .= '<br class="clearBoth" />';
    $content .= '</div>';
    $random_featured_product->MoveNextRandom();

    }
    $content .= '</div>';
    ?>
    non modified tpl_best_sellers.php
    <?php
    /**
    * Side Box Template
    *
    * @package templateSystem
    * @copyright Copyright 2003-2005 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_best_sellers.php 2982 2006-02-07 07:56:41Z birdbrain $
    * @version $Id: tpl_best_sellers.php 2982 2007-12-15 21:00:00 TRUST IT - www.trustit.ca - [email protected] $
    */
    $content = '';
    $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";
    $content .= '<div class="wrapper"><table cellpadding=0 cellspacing=0 border=0>' . "\n";
    for ($i=1; $i<=sizeof($bestsellers_list); $i++) {
    $imgLink = DIR_WS_IMAGES . $bestsellers_list[$i]['image'];
    if ($i==2) {$content .= '<tr><td colspan=2><hr></td></tr>';}
    $content .= '<tr><td valign=top><a href="' . zen_href_link(zen_get_info_page($bestsellers_list[$i]['id']), 'products_id=' . $bestsellers_list[$i]['id']) . '">' . zen_image($imgLink, zen_trunc_string($bestsellers_list[$i]['name']), SMALL_IMAGE_WIDTH/2, SMALL_IMAGE_HEIGHT/2) . '</a></td><td valign=top><a href="' . zen_href_link(zen_get_info_page($bestsellers_list[$i]['id']), 'products_id=' . $bestsellers_list[$i]['id']) . '">' . zen_trunc_string($bestsellers_list[$i]['name'], BEST_SELLERS_TRUNCATE, BEST_SELLERS_TRUNCATE_MORE) . '</a><BR><div align=right>' . zen_get_products_display_price($bestsellers_list[$i]['id']) . '</div></td></tr>' . "\n";
    }
    $content .= '</table></div>' . "\n";
    $content .= '</div>';

    ?>
    Rich People scream, Wealthy people whisper

    www.cooltechcentral.com

  4. #4

    Default Re: Making featured sidebox image smaller

    Whenever I try to modify the feature sidebox to look like the bestsellers sidebox I end up scrabbling the template.
    Rich People scream, Wealthy people whisper

    www.cooltechcentral.com

  5. #5

    Default Re: Making featured sidebox image smaller

    If I modify my tpl_featured.php file similar to my tpl_best_seller.php and modify this best sellers div class function for featured sidebox and add it the stylesheet

    .bestsellers_thumbnail {
    width: 26px;
    padding-right: 4px;
    float: left;
    margin: 0px;
    }

    #bestsellers .wrapper {
    margin: 0em 1.1em 0em 0.9em;
    }

    #bestsellers ol {
    padding: 0;
    margin-left: 1.1em;
    }

    #bestsellers li {
    margin-left: 3px;
    padding-top: 5px;
    margin: 0em 0em 1.3em 0em;
    clear: both;
    }
    will it work?
    Rich People scream, Wealthy people whisper

    www.cooltechcentral.com

 

 

Similar Threads

  1. Featured Product Sidebox Image - Only used in sidebox?
    By adg_ in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 18 Mar 2010, 07:38 AM
  2. Medium Image in Featured sidebox
    By lbooth in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 11 Sep 2008, 11:19 AM
  3. featured sidebox image next to text.
    By ctcentralinfo in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 Aug 2008, 03:57 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