Product images not displaying on frontend

  • Posts: 37
  • Thank you received: 0
9 years 6 months ago #230637

-- HikaShop version -- : HikaShop Business 2.3.5
-- Joomla version -- : 3.4.8
-- PHP version -- : 5
-- Browser(s) name and version -- : firefox
-- Error-message(debug-mod must be tuned on) -- : $this->image->getThumbnail() not returning anything

We are not able to see product images on the frontend product listing, detail, category pages. But when I am checking the same product in admin panel then the image is showing correctly. I am sure this cannot be a file permission issue because the <img> tag src parameter is also showing blank.

I am assuming $this->image->getThumbnail() is not returning anything. Please advise asap.

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

  • Posts: 84307
  • Thank you received: 13701
  • MODERATOR
9 years 6 months ago #230640

Hi,

If you look at the code in the view listing_img_title which is used for the listing of products by default you can see that:

$img = $this->image->getThumbnail(@$this->row->file_path, array('width' => $this->image->main_thumbnail_x, 'height' => $this->image->main_thumbnail_y), $image_options);
			if($img->success) {
				echo '<img class="hikashop_product_listing_image" title="'.$this->escape(@$this->row->file_description).'" alt="'.$this->escape(@$this->row->file_name).'" src="'.$img->url.'"/>';
			}
So if the call to getThumbnail would return nothing, it wouldn't go in the if and the img tag wouldn't be displayed at all.

I've checked your website and I can see that the view was heavily modified:
take.ms/PfJap
And I actually don't see the img tag, just an a tag without any img tag inside (I suppose that there should be the img tag normally in there).

I would say that there is a high chance that it comes from the customizations in the view files.
If you rename the folder templates/YOUR_TEMPLATE/html/com_hikashop/product/ to something else via FTP, that will deactivate all the overrides for the products. If the images are then displayed properly, they it would confirm that it comes from the modifications of the code.
Otherwise, it might be an issue with the generation of the thumbnails (like not being able to store the thumbnails after their generation due to a permission issue in your upload folder or something similar).

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

  • Posts: 37
  • Thank you received: 0
9 years 6 months ago #230808

Hi,

Thanks for your reply. Actually, there is also a component installed JMS Multisite and we also have a staging site. The same files are present in the staging site also and the staging site is working fine. No image issue is occuring on the staging site.

Is it possible to disable product image feature from admin panel? Maybe some settings causing the issue.

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

  • Posts: 84307
  • Thank you received: 13701
  • MODERATOR
9 years 6 months ago #230835

Hi,

There is no option to deactivate the images on the backend.

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

  • Posts: 37
  • Thank you received: 0
9 years 6 months ago #231222

Hi Nicolas,

We have tried to rename the folder templates/YOUR_TEMPLATE/html/com_hikashop/product/ to something else via FTP, but still the images aren't showing. Do you have any idea/suggestion how it is happening?

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
9 years 6 months ago #231230

Hi,

If you're using JMS ; I suggest you to update all your components in order to be sure to have latest updates/fixes.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.060 seconds
Powered by Kunena Forum