unique thumbnail widths

  • Posts: 100
  • Thank you received: 2
11 years 6 months ago #100981

Hi All,

Is it possible to have a unique thumbnail width for different product categories? For instance, I have one category consisting of long, horizontal products and I have set the thumbnail width in Configuration > Main > Images to Thumbnail width 800 px. The category page is one column and it works well.

The next category of products are square and the category is set to 3 columns but the thumbnails don't line up because the default is now set to 800 px wide.

Is there a better place to set the width so I can have more flexibility to accommodate the differently shaped products residing in the different categories?

Thanks for any assistance.

Attachments:

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

  • Posts: 26151
  • Thank you received: 4027
  • MODERATOR
11 years 6 months ago #101031

Hi,

There is only one option for the thumbnail width but you can override the views in order to not use the hikashop thumbnail configuration values.
By changing the values in the function which generate (and display) the thumbnails, you would be able to have different values for your different categories.

The view that you have to change would depend on your category listing.

Regards,


PS: I move the topic in a more appropriate section. No worry :)


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.

  • Posts: 100
  • Thank you received: 2
11 years 6 months ago #101172

Thanks for responding.

I don't quite understand. Can you direct me how to determine the right view and how to change it?

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

  • Posts: 26151
  • Thank you received: 4027
  • MODERATOR
11 years 6 months ago #101210

Hi,

The view that you have to change would depend on your category listing.

We have to know more on your website and what you are currently displaying.
If we can't know which listing you use exactly, we can't indicate you the right file to edit.

But you can found the right view:

By checking the "HikaShop content menu" (or module), you have create a category listing and set some options.
There is the "type of layout" (div, table, list, etc) and the "type of item layout" (image, image and title, image en description, slider, etc).

By listing the HikaShop views, you can use the search filter on "category" in order to see only the category views.
At this moment you would see "listing", "listing_div", "listing_img", "listing_img_desc", etc.
Some are the containers (the type of layout) and other are the items (type of item layout). You can determine it thanks to the keyword which could be from the container or the item list.

The rest of the process would require some PHP skills.

You have to edit the "item" and change the way that the image is displayed into.
echo $this->image->display(@$this->row->file_path,false,$this->escape($this->row->file_name), '' , '' , $this->image->main_thumbnail_x,  $this->image->main_thumbnail_y)
The $this->image->main_thumbnail_x and $this->image->main_thumbnail_y should be changed dynamically thanks to some PHP code in order to have different value depending the category.

With $this->pageInfo->filter->cid you would find the information of the parent category for the listing.

Best 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.

  • Posts: 100
  • Thank you received: 2
11 years 6 months ago #101710

Thank you!

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

Time to create page: 0.062 seconds
Powered by Kunena Forum