Jump to content

Subcategories images not show


Recommended Posts

Make sure your category images exists on directory ../img/c/
Try to load it directly on your browser, e.g http://domain.com/img/c/ID_CATEGORY.jpg (replace ID_CATEGORY with real ID)
If its there and can be loaded directly, then there is something wrong with your theme file or the related smarty code. (commonly the suspected file is category.tpl)
You can check the category image link with "view source" menu or any other tool within your browser, to find out is there something wrong with the image link src.
Also don't forget to inform your Prestashop version and the theme currently used.

Link to comment
Share on other sites

There is nothing wrong with your prestashop image directory, all category images shouls be placed on ../img/c/

Read again my previous post carefully.

 

The weird thing for me is, your PrestaShop base_url

http://mingproductions.com/
 

http://mingproductions.com/catalogue/

 

Which one is correct ?

 

 

The category image for id_category = 19 doesn't exists, and maybe all of your category images doesn't exist because the following image URL's doesn't show the images.

http://mingproductions.com/catalogue/img/c/19.jpg
http://mingproductions.com/catalogue/img/c/12.jpg
http://mingproductions.com/catalogue/img/c/13.jpg

OR

http://mingproductions.com/img/c/19.jpg
http://mingproductions.com/img/c/12.jpg
http://mingproductions.com/img/c/13.jpg

... and so on

Make sure you've uploaded all category images, and make sure it's exist on ../img/c/

You can chek with FTP or through your hosting file manager.

The category images will have a filename like this (file extension .jpg):

[id_category].jpg
[id_category]-[image_type].jpg

By default, there are 2 category image types : category_default AND medium_default

When regenerating category images, make sure that the images regeneration applied for both image types.

 

 

Your category image URL will be look like this, because Friendly URL feature is enabled on your PrestaShop.

[base_url]/c/[id_category]-[image_type]/[category_name].jpg

If your base_url is http://mingproductions.com/ then your category image URL will be look like this :

http://mingproductions.com/c/19-category_default/pencils.jpg
http://mingproductions.com/c/19-medium_default/pencils.jpg

If your base_url is http://mingproductions.com/catalogue then your category image URL will be look like this :

http://mingproductions.com/catalogue/c/19-category_default/pencils.jpg
http://mingproductions.com/catalogue/c/19-medium_default/pencils.jpg
Link to comment
Share on other sites

 

There is nothing wrong with your prestashop image directory, all category images shouls be placed on ../img/c/

Read again my previous post carefully.

 

The weird thing for me is, your PrestaShop base_url

http://mingproductions.com/

 

http://mingproductions.com/catalogue/

 

Which one is correct ?

 

 

The category image for id_category = 19 doesn't exists, and maybe all of your category images doesn't exist because the following image URL's doesn't show the images.

http://mingproductions.com/catalogue/img/c/19.jpg
http://mingproductions.com/catalogue/img/c/12.jpg
http://mingproductions.com/catalogue/img/c/13.jpg

OR

http://mingproductions.com/img/c/19.jpg
http://mingproductions.com/img/c/12.jpg
http://mingproductions.com/img/c/13.jpg

... and so on

Make sure you've uploaded all category images, and make sure it's exist on ../img/c/

You can chek with FTP or through your hosting file manager.

The category images will have a filename like this (file extension .jpg):

[id_category].jpg
[id_category]-[image_type].jpg

By default, there are 2 category image types : category_default AND medium_default

When regenerating category images, make sure that the images regeneration applied for both image types.

 

 

Your category image URL will be look like this, because Friendly URL feature is enabled on your PrestaShop.

[base_url]/c/[id_category]-[image_type]/[category_name].jpg

If your base_url is http://mingproductions.com/ then your category image URL will be look like this :

http://mingproductions.com/c/19-category_default/pencils.jpg
http://mingproductions.com/c/19-medium_default/pencils.jpg

If your base_url is http://mingproductions.com/catalogue then your category image URL will be look like this :

http://mingproductions.com/catalogue/c/19-category_default/pencils.jpg
http://mingproductions.com/catalogue/c/19-medium_default/pencils.jpg

 

Thanks for the long explanation gonebdg!

 

The solution in the end is to hardcode-upload the images in the /img/c/ server folder with the appropriate names:

 

[id_category].jpg

[id_category]-[image_type].jpg

 

Otherwise, using the backoffice Categories>Subcategory-name>Edit>Image did not work for me. 

Link to comment
Share on other sites

Thanks for the long explanation gonebdg!

 

The solution in the end is to hardcode-upload the images in the /img/c/ server folder with the appropriate names:

 

[id_category].jpg

[id_category]-[image_type].jpg

 

Otherwise, using the backoffice Categories>Subcategory-name>Edit>Image did not work for me. 

 

Glad my explanation can help, but i don't understand what you've said.

If your solution the "hardcode-upload" meaning renaming the image file manually, it's not recommended.

 

When you're uploading image file on B.O > Catalogue > Categories >> Edit, PrestaShop will automatically generating the necessary thumbnail images with the appropriate filename.

Link to comment
Share on other sites

Glad my explanation can help, but i don't understand what you've said.

If your solution the "hardcode-upload" meaning renaming the image file manually, it's not recommended.

 

When you're uploading image file on B.O > Catalogue > Categories >> Edit, PrestaShop will automatically generating the necessary thumbnail images with the appropriate filename.

 

Yes, but that did not work for me. 

 

So I uploaded the images in my img/c/ server folder directly.

 

Besides, if you want a different image to show on the subcategory thumbnail (square) and the subcategory main image (rectangular), I don't see any other way. Do you?

 

Thanks again!

Link to comment
Share on other sites

What happen if you're uploading the image file through category editor page, is the filename is different or there are no thumbnail images being generated automatically ?

 

You can create custom image_type to get a square thumbnail for your category image on B.O > Preferences > Images
e.g : big_square , medium_suare, or small_square

But then you should modify your theme file category.tpl to change the image_type within the related smarty html code
for example, from medium_default into medium_square

Link to comment
Share on other sites

When I uploaded through Category Preferences two things happened:

 

1- Question mark image appeared in the subcategory thumbnail in the Category page.

2- The intented image for the thumbnail appeared in the Subcategory page.

 

Again, uploading each individual image with your file name recommendations worked fine.

 

Why is it not recommended?

Link to comment
Share on other sites

It's not recommended because you have to do it manually whereas it can be done automatically.

However it doesn't harm and if you are quite satisfied with the way it is, then no problem.

I just want to discuss more about it, to figuring out the problem exactly.
So you don't have to uploading it manually, and this topic can be useful for other prestashop users who have the same problem.

Since PrestaShop v.1.6.0.14 you can upload another image files for sub.category.

The default image which usually had a rectangle shape and the thumbnail images (maximum 3 image files) which can have square shape.

But if you used the previous version of PrestaShop then you can't do something like that through the Category add/edit interface (not work for sub.category), and should do it just the way you did it right now.

Link to comment
Share on other sites

  • 2 years later...

Categories and subcategories image is not showing in Front office.

I attached my image file.

How to resolve my problem. Please give me proper solution.

http://www.pts.local/shop/c/en-default-category_default/centrifuges.jpg

This is my image URL. 

Getting Image is not available logo.

 

 

Selection_014.png

Selection_015.png

category.png

Edited by kirubanidhi (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...