- Posts: 41
- Thank you received: 0
Layout Bug - Product Page and Thumbnails
13 years 9 months ago #81691
by gteigland
Layout Bug - Product Page and Thumbnails was created by gteigland
I isolated the problem but can't figure out a solution.
1. Set thumbnail size to 250px on width only in Configuration/files
2. If I load an image that is smaller then 250px in width then the description text is behind the image.
3. When I use firebug it says the div "hikashop_product_main_image" height: 20px
4. I went into file show_block_img.php and noticed these codes:
$style = ' style="height:' . ($height +20) . 'px;"'
AND
<div style="height:<?php echo $divHeight+20;?>px;text-align:center;clear:both;" class="hikashop_product_main_image">
I'm assuming that "20" is where it's getting that css. So Im assuming when there is no image that's what it puts in but like I said earlier this css pops in when I load an image that is smaller then what I sent for thumbnails size. I have a large catalog and image sizes are all over the place.
For example this image I loaded has a width of 225px. You can see what happens to the description. If I change the settings in configuration/files to 225px then it works fine. But I need to have that setting at 250px since I have images sizes all over the place.
Thanks
1. Set thumbnail size to 250px on width only in Configuration/files
2. If I load an image that is smaller then 250px in width then the description text is behind the image.
3. When I use firebug it says the div "hikashop_product_main_image" height: 20px
4. I went into file show_block_img.php and noticed these codes:
$style = ' style="height:' . ($height +20) . 'px;"'
AND
<div style="height:<?php echo $divHeight+20;?>px;text-align:center;clear:both;" class="hikashop_product_main_image">
I'm assuming that "20" is where it's getting that css. So Im assuming when there is no image that's what it puts in but like I said earlier this css pops in when I load an image that is smaller then what I sent for thumbnails size. I have a large catalog and image sizes are all over the place.
For example this image I loaded has a width of 225px. You can see what happens to the description. If I change the settings in configuration/files to 225px then it works fine. But I need to have that setting at 250px since I have images sizes all over the place.
Thanks
Please Log in or Create an account to join the conversation.
13 years 9 months ago #81771
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Layout Bug - Product Page and Thumbnails
Hi,
This bug has been fixed in the latest HikaShop package.
There is a french topic which explain the bug fix:
www.hikashop.com/en/forum/5-support-en-f...-le-texte.html#80912
Here the "translated" version:
Regards,
This bug has been fixed in the latest HikaShop package.
There is a french topic which explain the bug fix:
www.hikashop.com/en/forum/5-support-en-f...-le-texte.html#80912
Here the "translated" version:
This fix has to be apply on the view "product | show_block_img" of your front-end template.
It is a classical override which would replace:By:Code:<div style="height:<?php echo $divHeight+20;?>px;text-align:center;clear:both;" class="hikashop_product_main_image">Code:<div style="<?php if(!empty($divHeight)){ echo 'height:'.($divHeight+20).'px;'; } ?>text-align:center;clear:both;" class="hikashop_product_main_image">
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: gteigland
Please Log in or Create an account to join the conversation.
13 years 9 months ago #81784
by gteigland
Replied by gteigland on topic Layout Bug - Product Page and Thumbnails
Worked great!
Please Log in or Create an account to join the conversation.
13 years 9 months ago #82232
by gteigland
Replied by gteigland on topic Layout Bug - Product Page and Thumbnails
Now I discover a new problem but related. If the thumbnail is smaller then what I set then in the category view with all the products, it blows up the image and then affects all the other ones after it. See image attached. Is there a code that needs to be replaced in category view as well.
Thanks!
Thanks!
Please Log in or Create an account to join the conversation.
13 years 9 months ago #82439
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Layout Bug - Product Page and Thumbnails
Hi,
Could you provide a link to your store ?
I think there is a file access problem because you have some missing images.
Regards,
Could you provide a link to your store ?
I think there is a file access problem because you have some missing images.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
13 years 9 months ago #82441
by gteigland
Replied by gteigland on topic Layout Bug - Product Page and Thumbnails
Actually I know it's not a file url problem. Because for example on this page:
new.furnitureandthings.com/browse-produc...57-occasional-tables
The "Chairside Cabinet" is causing the problem. When I resize that image to what I set for thumbnails (150px or above) then everything works fine. Right now that image for Chairside Cabinet is smaller then 150px which for whatever reason is messing up the rest of the products on that page.
It's a similar problem showing up on the category page.
Does that make sense?
new.furnitureandthings.com/browse-produc...57-occasional-tables
The "Chairside Cabinet" is causing the problem. When I resize that image to what I set for thumbnails (150px or above) then everything works fine. Right now that image for Chairside Cabinet is smaller then 150px which for whatever reason is messing up the rest of the products on that page.
It's a similar problem showing up on the category page.
Does that make sense?
Please Log in or Create an account to join the conversation.
13 years 9 months ago #82548
by Xavier
Replied by Xavier on topic Layout Bug - Product Page and Thumbnails
The link provided doesn't work.
Could you check that ?
Could you check that ?
Please Log in or Create an account to join the conversation.
13 years 9 months ago #82591
by gteigland
Replied by gteigland on topic Layout Bug - Product Page and Thumbnails
Sorry.. This should work.
furnitureandthings.com/index.php?option=...al-tables&Itemid=389
YOU HAVE TO GO TO PAGE 5 in that category to see the issue.
Thanks
furnitureandthings.com/index.php?option=...al-tables&Itemid=389
YOU HAVE TO GO TO PAGE 5 in that category to see the issue.
Thanks
Please Log in or Create an account to join the conversation.
13 years 9 months ago #82863
by nicolas
Replied by nicolas on topic Layout Bug - Product Page and Thumbnails
Ok, I see what it the problem.
It's because the system uses the first image of the listing in order to decide of the ideal size when you don't specify one of the dimensions for the thumbnails and since the normal image of your product is smaller that the dimension that you specified for the thumbnails, the system ignores it and it considers that no thumbnails are necessary for the images.
Please change the code:
to:
in the file administrator/components/com_hikashop/helpers/image.php and that should avoid that issue.
It's because the system uses the first image of the listing in order to decide of the ideal size when you don't specify one of the dimensions for the thumbnails and since the normal image of your product is smaller that the dimension that you specified for the thumbnails, the system ignores it and it considers that no thumbnails are necessary for the images.
Please change the code:
Code:
if(empty($width)){
list($width, $height) = $this->scaleImage($theImage->width, $theImage->height, 0, $height);
}
if(empty($height)){
list($width, $height) = $this->scaleImage($theImage->width, $theImage->height, $width, 0);
}
Code:
if(empty($width)){
if($theImage->height >= $height){
list($width, $height) = $this->scaleImage($theImage->width, $theImage->height, 0, $height);
}else{
$width=$this->image->main_thumbnail_x;
}
}
if(empty($height)){
if($theImage->width >= $width){
list($width, $height) = $this->scaleImage($theImage->width, $theImage->height, $width, 0);
}else{
$height=$this->image->main_thumbnail_y;
}
}
The following user(s) said Thank You: gteigland
Please Log in or Create an account to join the conversation.
Time to create page: 0.205 seconds