-- url of the page with the problem -- : localhost
-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.4
-- Error-message(debug-mod must be tuned on) -- : array(2) { ["width"]=> int(300) ["height"]=> int(200) }
array(2) { ["x"]=> int(150) ["y"]=> int(100) }
array(2) { ["x"]=> int(150) ["y"]=> int(100) }
array(2) { ["x"]=> int(150) ["y"]=> int(100) }
- Catalog view I see image size = 150x100. As set in configuration
- Product view I see image size = 150x100. I was expecting to see 300x200 as set in configuration
looking at components/com_hikashop/views/product/tmpl/show_block_img.php
line 63:
$img = $this->image->getThumbnail(@$image->file_path, array('width' => $width, 'height' => $height), $image_options);
an array is set with width and height
this is used for function getThumbnail
looking at administrator/components/com_hikashop/helpers/image.php
around line 376 in function getThumbnail
if(empty($size) || !is_array($size) || (!isset($size['x']) && !isset($size[0])))
$size = array('x' => (int)$config->get('thumbnail_x', 100), 'y' => (int)$config->get('thumbnail_y', 100));
if(isset($size['width']))
$size = array('x' => (int)$size['width'], 'y' => (int)$size['height']);
if(!isset($size['x']))
$size = array('x' => (int)$size[0], 'y' => (int)$size[1]);
I've changed it to:
var_dump($size);
if(empty($size) || !is_array($size) || (!isset($size['x']) && !isset($size[0])))
$size = array('x' => (int)$config->get('thumbnail_x', 100), 'y' => (int)$config->get('thumbnail_y', 100));
var_dump($size);
if(isset($size['width']))
$size = array('x' => (int)$size['width'], 'y' => (int)$size['height']);
var_dump($size);
if(!isset($size['x']))
$size = array('x' => (int)$size[0], 'y' => (int)$size[1]);
var_dump($size);
after reloading product detail page I get the following just before the image.
array(2) { ["width"]=> int(300) ["height"]=> int(200) }
array(2) { ["x"]=> int(150) ["y"]=> int(100) }
array(2) { ["x"]=> int(150) ["y"]=> int(100) }
array(2) { ["x"]=> int(150) ["y"]=> int(100) }
In the first if-then-else statement the $size var is overriden with new data and my configured width and height are gone
is this a bug? Or did I miss a very obvious setting?