Problem with display image

  • Posts: 25
  • Thank you received: 1
11 years 6 months ago #69764

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.

  • Posts: 12953
  • Thank you received: 1778
11 years 6 months ago #69799

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.

  • Posts: 25
  • Thank you received: 1
11 years 6 months ago #69800

no option for table layout

Attachments:

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

  • Posts: 12953
  • Thank you received: 1778
11 years 6 months ago #69803

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.

  • Posts: 25
  • Thank you received: 1
11 years 6 months ago #69804

I tried but does not work

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

  • Posts: 81565
  • Thank you received: 13074
  • MODERATOR
11 years 6 months ago #69936

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.

  • Posts: 25
  • Thank you received: 1
11 years 6 months ago #69944

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

Attachments:
Last edit: 11 years 6 months ago by fdesanto.

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

  • Posts: 81565
  • Thank you received: 13074
  • MODERATOR
11 years 6 months ago #70016

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

<?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:
<?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.

  • Posts: 25
  • Thank you received: 1
11 years 6 months ago #70060

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.

<?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:
<?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.

  • Posts: 81565
  • Thank you received: 13074
  • MODERATOR
11 years 6 months ago #70180

1. It should be like that:

<?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.086 seconds
Powered by Kunena Forum