ezra-man Posted October 31, 2010 Share Posted October 31, 2010 I'd like my pictures in this section to be the exact size of the featured products squares, without the white background that is generated (I assume) by some sort of resizing process. Sometimes the white background is a thick vertical border; sometimes it is a white horizontal border. I have attached a sample picture showing two cells (I put them on a black background so that it is easy to see what I am talking about). I was able to fix this issue on the product page by changing the global.css, but I can't figure out how to fix it on the featured products page.I searched this forum and the closest instructions I found were from Rocky, the Moderator:http://www.prestashop.com/forums/viewthread/22425/general_discussion/solved_how_to_resize_featured_product_thumb_image_size_dot__dot_/ The sizes are hardcoded in modules/homefeatured/homefeatured.tplSearch for the following code in the file and change the values:height="129" width="129" However, in my homefeatured.tpl, the code is different:height="{$homeSize.height}" width="{$homeSize.width}" I then went into preferences, images, and changed the dimensions of "home" but that does not affect the white borders. If I decrease the size, the entire picture (along with the white borders) shrinks. Any ideas how I can fix this?Thanks Link to comment Share on other sites More sharing options...
rocky Posted October 31, 2010 Share Posted October 31, 2010 This post might help. Link to comment Share on other sites More sharing options...
ezra-man Posted November 1, 2010 Author Share Posted November 1, 2010 Thanks for the reply. I followed the instructions in the post and it almost worked, but there is a problem. I have been working on it for a while and I have figured out what the problem seems to be with this fix. Yes, the white border is gone, and, yes, the image fills up the entire box in the featured products. However, for uploaded images that are not square, the head/top of the picture gets cut off. So, for the default ipod images that were on prestashop, for the images that aren't square, the top of the product gets cut off. If the pic is of a person, the head is chopped off!!! It'd be hysterically funny if it didn't make me want to pull my hair out. I'm attaching a picture.All of my images are 345 width by 682 height. Is there some modification I can make in images.inc.php that will adjust the resizing/take account of the width to height ratio? Link to comment Share on other sites More sharing options...
rocky Posted November 1, 2010 Share Posted November 1, 2010 If all your images have the same height and width, then go to the Preferences > Images tab and change the thumbnail size to match the images, then click "Regenerate thumbnails". Link to comment Share on other sites More sharing options...
ezra-man Posted November 1, 2010 Author Share Posted November 1, 2010 I'm having a little trouble understanding If all your images have the same height and width, then go to the Preferences > Images tab and change the thumbnail size to match the images, then click “Regenerate thumbnails”. None of the settings in the Preferences > Images tab is called "thumbnail size," so I don't now which one that is. Assuming that the "small" image is the thumbnail size, are you saying that I should change the setting from 45 by 45 to 345 by 682 (the size of my product pics)? In any event, I changed both the "small" size and the "thumb_scene" size to 345 width by 682 height, saved it, and then clicked regenerate. The head is still chopped off.On the other hand, maybe I didn't explain myself well before? Although all of my pictures have the same dimensions -- 345 by 682, none of the pictures are square (same width and height). I had inserted a square picture just as a test, as part of the process of trying to figure out how to get rid of the white space that originally surrounded the images in the featured products section.Could it be that the problem is that I only uploaded one image for each product? There did not seem to be a way to upload an image that would be the Product cover, and a separate image that would go on the featured products page . . . Link to comment Share on other sites More sharing options...
rocky Posted November 1, 2010 Share Posted November 1, 2010 There are multiple thumbnail sizes. The "thickbox" size is displayed in thickbox, the "large" size is the big image on the product page, the "medium" size is used blocks like the "specials" block, and the "home" size is used on product listings and featured products. You should use the same ratio for all the sizes. For example, you could make thickbox size 345 x 682, large size 152 x 300, etc. Link to comment Share on other sites More sharing options...
ezra-man Posted November 2, 2010 Author Share Posted November 2, 2010 Okay, sorry. I am being dense. Presumably the reason for the white border that I eliminated (my original question) is to fit every image into a square. So, changing the home size to have dimensions proportional to the large pic changes the shape of the cells in featured products from square to rectangular. I don’t want that – I want the featured products to look the way it is built – with square images.So, to maintain the squared appearance of images in featured products, I have left the home image as a square, and uploaded some small square images that I have of the products. In product.tpl, I commented out the big image {*{if $have_image} getImageLink($product->link_rewrite, $cover.id_image, 'large')}" {if $jqZoomEnabled}class="jqzoom" alt="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox')}"{else} title="{$product->name|escape:'htmlall':'UTF-8'}" alt="{$product->name|escape:'htmlall':'UTF-8'}" {/if} id="bigpic" width="{$largeSize.width}" height="{$largeSize.height}" /> {else} name|escape:'htmlall':'UTF-8'}" /> {/if}*} , and I also commented out the print and view larger buttons >{*<!-- usefull links--> </pre> <ul> {if $HOOK_EXTRA_LEFT}{$HOOK_EXTRA_LEFT}{/if} {l s='Print'} {if $have_image && !$jqZoomEnabled} {l s='View full size'} {/if} </ul>* and I downloaded a slider module with two fading pictures that I got here (http://www.prestashop.com/forums/viewthread/16082/modules/module_slideshow_in_home_page). I made sure the images in the slider are the same dimensions as my large picture (345 by 682). So my first product page looks great – in the left column is a fadein/fadeout slider and in the middle column are the product attributes, add to cart, etc. I also have the slider on the home page in the left column (to the left of the featured products table) (slider1), with a product.php exception so it doesn’t appear on the product page. Silder 2 has an index.php exception so that slider2 does not appear on the home page.This is my problem: I need different slide images for each of my eight products. I can easily copy the module 8 times, giving each module a different name, and insert different images in each module, but I don’t know how to create an exception between products (as opposed to excepting the index.php). Alternatively, is there some code that could be inserted into product.php that would have each product page call a different slider (slider 3, slider 4, etc.)? Thanks so much for your help. I really appreciate it. Link to comment Share on other sites More sharing options...
ezra-man Posted November 2, 2010 Author Share Posted November 2, 2010 Actually, could the solution be in creating a hook? I know it is not that hard to create your own hooks. But is it possible to create a hook to a specific product? Link to comment Share on other sites More sharing options...
nuclearholocausto Posted March 6, 2011 Share Posted March 6, 2011 After so much searching and trying, I finally able to change the default white background to the preferred black bg. My only other issue is the regenerating the images doesn't make any difference. After clicking the regenerate button, cleared my cache and refreshed my browser, the old images stays the same "white background". Please help! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now