Skip to main content

Problem with display image

More
13 years 11 months ago #69764 by fdesanto
Hi

1. Problem image in Table Listing Layout+
in product table list the images size are equal to those of the product page(not icon size)

2. Problem image in Compare Layout
in compare layout you can not see the images.
example the icon image size is set to 50x50 pixel but the src image is /media/com_hikashop/upload/thumbnail_49x50/xxxx.jpg or /media/com_hikashop/upload/thumbnail_47x50/xxxx.jpg, the correct src image is /media/com_hikashop/upload/thumbnail_50x50/xxxx.jpg

Thanks

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #69799 by Mohamed Thelji
Hi,

1. You'll just have to change the "Image width/height" options through you listing configuration page

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #69800 by fdesanto
no option for table layout

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #69803 by Mohamed Thelji
Ok, then you should just :
- Set your "Type of layout" to DIV
- Set your "Image width/height"
- SAVE
- Set your "Type of layout" to table again

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #69804 by fdesanto
I tried but does not work

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #69936 by nicolas
Hi,

1. For the product page, it's the "product page image width/height" options of the Files/Images tab of the configuration which is used. So you should just set what you want there. If the fields are empty, it indeed uses the same same as the product listing thumbnails which can be changed with the option "thumbnails width/heitght" of that same screen.

2. Please change the line:
<?php echo $this->image->display($image->file_path,true,$image->file_name,'id="hikashop_main_image" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"','id="hikashop_main_image_link"' ); ?>

to:
<?php echo $this->image->display($image->file_path,true,$image->file_name,'id="hikashop_main_image" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"','id="hikashop_main_image_link"' , $config->get('thumbnail_x',100), $config->get('thumbnail_y',100)); ?>

in the file "compare" via the menu Display>Views and that will display the images properly on the comparison page.

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago - 13 years 11 months ago #69944 by fdesanto
1.The fields are not empty!
I set the image size to 300x300 for product page, and 50x50 for thumbnail.
But the thumbnail in product table listing layout is 300x300.

2. PHP Fatal error: Call to a member function get() on a non-object in /home/newdigilab/public_html/templates/web/html/com_hikashop/product/compare.php on line 82
Last edit: 13 years 11 months ago by fdesanto.

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #70016 by nicolas
1. Then, it means that in the hikashop options of your listing menu, you have set the images width/height to 300*300. If you leave them empty, it will take the size of 50*50 that you have in the configuration.

2. My bad, you should replace the code
Code:
<?php echo $this->image->display($image->file_path,true,$image->file_name,'id="hikashop_main_image" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"','id="hikashop_main_image_link"' ); ?>
by:
Code:
<?php $config =& hikashop_config(); echo $this->image->display($image->file_path,true,$image->file_name,'id="hikashop_main_image" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"','id="hikashop_main_image_link"' , $config->get('thumbnail_x',100), $config->get('thumbnail_y',100)); ?>
in the file "compare" via the menu Display>Views

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #70060 by fdesanto
1. My configuration are correct the problem is in file listing_table.php, I followed also the instructions of Mohamed;
now if is set product page image size on configuration, the thumbnail size is ignored.
Code:
<?php foreach($this->rows as $row){ $this->row =& $row; $height = $this->config->get('product_image_y'); $width = $this->config->get('product_image_x'); if(empty($height)) $height=$this->config->get('thumbnail_y'); if(empty($width)) $width=$this->config->get('thumbnail_x'); $divWidth=$width; $divHeight=$height; $this->image->checkSize($divWidth,$divHeight,$row); $link = hikashop_completeLink('product&task=show&cid='.$this->row->product_id.'&name='.$this->row->alias.$this->itemid.$this->category_pathway); ?>
should be:
Code:
<?php foreach($this->rows as $row){ $this->row =& $row; $height = $this->config->get('thumbnail_y'); $width = $this->config->get('thumbnail_x'); if(empty($height)) $height=$this->config->get('product_image_y'); if(empty($width)) $width=$this->config->get('product_image_x'); $divWidth=$width; $divHeight=$height; $this->image->checkSize($divWidth,$divHeight,$row); $link = hikashop_completeLink('product&task=show&cid='.$this->row->product_id.'&name='.$this->row->alias.$this->itemid.$this->category_pathway); ?>

2. Ok, now work

Please Log in or Create an account to join the conversation.

More
13 years 11 months ago #70180 by nicolas
1. It should be like that:
Code:
<?php foreach($this->rows as $row){ $this->row =& $row; $height = $this->params->get('image_height'); $width = $this->params->get('image_width'); if(empty($height)) $height=$this->config->get('thumbnail_y'); if(empty($width)) $width=$this->config->get('thumbnail_x'); $divWidth=$width; $divHeight=$height; $this->image->checkSize($divWidth,$divHeight,$row); $link = hikashop_completeLink('product&task=show&cid='.$this->row->product_id.'&name='.$this->row->alias.$this->itemid.$this->category_pathway); ?>

Please Log in or Create an account to join the conversation.

Time to create page: 0.224 seconds
Powered by Kunena Forum