Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2007
    Posts
    241
    Plugin Contributions
    0

    help question Featured Sidebox - Changing Image Size

    I'm trying to keep the image size in the featuredf sizebox under control. The default is the small image size, which doesn't work in my instance; it is a bit too big.

    So, I found the file TPL_FEATURED.PHP in the sideboxes template directory of ZC 3.8A.

    Line 17:


    $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);

    I tried changing the SMALL_IMAGE_WIDTH to
    'width="90"' but it didn't change anything.

    What is the correct means of changing this image size?

    Thank you!

    Donn

  2. #2
    Join Date
    Oct 2007
    Posts
    241
    Plugin Contributions
    0

    Default Re: Featured Sidebox - Changing Image Size

    Additional Info...

    I had a similar issue with the Manufacturer's Image in the Sidebox.

    A solution was presented on this board and it worked.

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

    I would like to do something similar for the featured sidebox, as it allowed the size to be changed in admin, and it functioned properly, resizing the image as per my settings.

  3. #3
    Join Date
    Oct 2007
    Posts
    241
    Plugin Contributions
    0

    Default Re: Featured Sidebox - Changing Image Size

    To continue....

    I used the example cited in the above response to my initial post
    Code:
    INSERT INTO configuration (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Featured Sidebox Image Width', 'IMAGE_FEATURED_WIDTH', 80, NULL, NOW(), NULL, NULL);
    INSERT INTO configuration (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Featured Sidebox Image Height', 'IMAGE_FEATURED_HEIGHT', '80', 'Default = 80', 4, 81, NULL, NOW(), NULL, NULL);
    I am unsure why there is a '4' and a '81' in there. Therefore, I don't know if I should change those values.

    and change the code in tpl_featured.php from...

    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_WIDTH, SMALL_IMAGE_HEIGHT);
    ...to...

    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'], IMAGE_FEATURED_WIDTH, IMAGE_FEATURED_HEIGHT);
    Any feedback would be much appreciated, as I would rather not try this without knowing it will work.
    Last edited by Donn; 13 Jun 2009 at 06:56 AM.

 

 

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. Featured Product Image Size
    By vdivito in forum Basic Configuration
    Replies: 1
    Last Post: 5 Apr 2009, 08:02 PM
  3. Image size in Featured Product box
    By CaroleAs in forum Basic Configuration
    Replies: 1
    Last Post: 27 Feb 2009, 05:58 AM
  4. Confused about Featured Image Size
    By roboto in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 3 Sep 2007, 11:24 AM
  5. Probs changing image size in sidebox
    By chacha-vintage in forum Basic Configuration
    Replies: 3
    Last Post: 6 Jun 2007, 10:12 PM

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