How to resize images for specific categories

  • Posts: 220
  • Thank you received: 10
3 years 3 months ago #334751

Hello. How to resize images for specific categories. In the configuration - basic tab, the sizes for all categories of the site are changed. I also need to set my own image size for a certain category. How to do it?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 3 months ago #334758

Hi,

In each menu item, via the Joomla menu manager, under the "products options" tab, you'll find thumbnails size settings for the listings of that menu item.
So if you have different menu items for different categories, you can have different thumbnail sizes for different categories.
So you have two ways to go about it:
- you can reproduce the category tree you have in HikaShop in the menu manager with one menu item per category with the corresponding parent elements, etc. That way, when you browse the categories on the frontend, the system will switch the menu items automatically based on the attached main category.
- You can create a menu item specific to a category, configure that menu item to display with thumbnails of a different size, get the URL of that menu item, set that URL in the "canonical URL" field of the category, and activate the "force canonical URL on listings" setting of the HikaShop configuration.

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

  • Posts: 220
  • Thank you received: 10
3 years 3 months ago #334761

Hello. Did on the 2nd point. For categories, the size has changed, but for the product card, it remains the same.

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

  • Posts: 12953
  • Thank you received: 1778
3 years 3 months ago #334767

Hello,
Can you give us more information about where you want to resize your image for your "Product card", by showing us screenshots of it and giving us an url to the page where you are having that issue so that we can directly test it ? Thank you.

Kind regards,
Mohamed.

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

  • Posts: 220
  • Thank you received: 10
3 years 3 months ago #334823

Hello. I would like the size of the product card pictures to change for a certain category of products.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 3 months ago #334824

Hi,

The size of the main image on the product details page is set by the "Product page image (width x height)" setting of the HikaShop configuration and thus is common for all the products.
Now, it should be possible to cheat with custom CSS code to reduce that size for some categories.
On each product details page, the main div has classes with that format hikashop_product_of_category_XX where XX is the id of the category.
So for example, you could have:

.hikashop_product_of_category_XX #hikashop_main_image {
    width: 50px;
}
which would force the width of the main image to 50px on the product details page of all the products of the category with the id XX.

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

  • Posts: 220
  • Thank you received: 10
3 years 3 months ago #334886

Hello. Where are these settings located?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 3 months ago #334898

Hi,

As I said, the "Product page image (width x height)" setting is in the HikaShop configuration, under the "main" tab, in the "images" section.

As for the custom CSS I provided in my previous message, if you want to add it on your end, there are several ways (in your template, in HikaShop). Here is a page where we explain how to add custom CSS to HikaShop:
www.hikashop.com/support/documentation/1...ize-the-display.html

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

  • Posts: 220
  • Thank you received: 10
3 years 3 months ago #334908

Thanks

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

Time to create page: 0.079 seconds
Powered by Kunena Forum