Jump to content

Subcategory image - thumbnail on category page & different heading image on subcat page


Recommended Posts

Is it possible (and if so where do I make the changes) to have a different image displaying as the subcategory thumbnail on the category page, and the larger "heading" image on the subcategory page.

I would like to have a 500 px wide landscape format image on the subcategory page, as per on the category page.

I have marked the various images on the two example images to show what I mean.

1 is a 500px wide heading image on the category page, which can specify in the admin panel

2 is the accessory thumbnail on eh category page, which matches the size format of product thumbnails, in this instance square

3. is the heading image on the subcategory page, and it takes the same image as in 2. From the white space each side of it, it is obviously expecting a landscape format image at 500px wide.

So how can I get a different, and landscape format image into position 3?

Thanks in advance as always

18705_uFb4Q9FlQW2PEwg3pjGK_t

18706_ZwiQuR0ma46mXA0tCvBn_t

Link to comment
Share on other sites

  • 3 months later...

@Rocky: thanks for the answer but unfortunately is not valid in my case, I guess :-(

What I need:

To have a small thumbnail in the subcategories index map but a LARGE picture when the product pages comes up.

WHY? Well, the subcategory picture is a key index itself for the products listed in the product list.

Please have look here under:

http://acpclassic.com/prestashop/category.php?id_category=58

So I need a large picture for the product listing page

When I save a large image for the product page (let's say those 500px) THEN THE THUMBNAIL in the subcategories index is set to a far larger size than what's needed.

The other way around:

When I define a small propoer thumbnail:

http://acpclassic.com/prestashop/category.php?id_category=10

Then the defined image is not enough large.

Can I define a different size for the product page whilw keeping the thumbnail small?

I guess I could fix that with your help by editing some .tpl but I don't know where exactly.

Any hint, please?

Thanks in advance

Link to comment
Share on other sites

Yes, you can have a large image in the subcategory page and a small image on the thumbnail. Go to Catalog > Image mapping, upload the large image, then assign it to the appropriate category. That way, the image uploaded for the category will only be displayed as the thumbnails and only the image map will be displayed on the subcategory page.

Link to comment
Share on other sites

  • 4 months later...
  • 10 months later...
  • 9 months later...

Can anyone help me out with that? It seems that with Prestashop 1.4 the image mapping hack doesnt work anymore as it always asks you to select a scene in the scene image. I don't want to add this scene. Can someone explain me a workaround or a hack on how to disable the scene selection function so I can simply upload a picture in the image map and assign it to a category???

 

Also, am I missing something here? This seems to be an ongoing issue for more than two years. Am I doing something wrong? Isn't everyone affected by that?

Link to comment
Share on other sites

I looked a bit further found a hack that allows me what I tried to do before. It disables the zone check and therefore you can simply upload a picture into image mapping without setting a zone. Here's how to do it:

 

Edit this file ../adminX/tabs/AdminScenes.php

At the end you'll find the following line:

public function postProcess()
{
 if (Tools::isSubmit('save_image_map'))
 {
  if (!Tools::isSubmit('categories') || !sizeof(Tools::getValue('categories')))
   $this->_errors[] = Tools::displayError('You should select at least one category');
  if (!Tools::isSubmit('zones') || !sizeof(Tools::getValue('zones')))
   $this->_errors[] = Tools::displayError('You should make at least one zone');
 }

 

Simply comment out the last two line of code:

 

public function postProcess()
{
 if (Tools::isSubmit('save_image_map'))
 {
  if (!Tools::isSubmit('categories') || !sizeof(Tools::getValue('categories')))
   $this->_errors[] = Tools::displayError('You should select at least one category');
 // if (!Tools::isSubmit('zones') || !sizeof(Tools::getValue('zones')))
 //  $this->_errors[] = Tools::displayError('You should make at least one zone');
 }

 

Done! Btw. by default the image mapping size is not similar to the category header image size. Go to preferences images and change the scene large image according to you category header images.

  • Like 1
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...