- Posts: 220
- Thank you received: 10
How to resize images for specific categories
5 years 2 months ago #334751
by ilyaminsk
How to resize images for specific categories was created by ilyaminsk
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.
5 years 2 months ago #334758
by nicolas
Replied by nicolas on topic How to resize images for specific categories
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.
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.
5 years 2 months ago #334761
by ilyaminsk
Replied by ilyaminsk on topic How to resize images for specific categories
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.
Less
More
- Posts: 12953
- Thank you received: 1778
5 years 2 months ago #334767
by Mohamed Thelji
Replied by Mohamed Thelji on topic How to resize images for specific categories
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.
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.
5 years 2 months ago #334823
by ilyaminsk
Replied by ilyaminsk on topic How to resize images for specific categories
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.
5 years 2 months ago #334824
by nicolas
Replied by nicolas on topic How to resize images for specific categories
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:
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.
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:
Code:
.hikashop_product_of_category_XX #hikashop_main_image {
width: 50px;
}
Please Log in or Create an account to join the conversation.
5 years 2 months ago #334886
by ilyaminsk
Replied by ilyaminsk on topic How to resize images for specific categories
Hello. Where are these settings located?
Please Log in or Create an account to join the conversation.
5 years 2 months ago #334898
by nicolas
Replied by nicolas on topic How to resize images for specific categories
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
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.
5 years 2 months ago #334908
by ilyaminsk
Replied by ilyaminsk on topic How to resize images for specific categories
Thanks
Please Log in or Create an account to join the conversation.
Time to create page: 0.205 seconds