Skip to main content

Resize product image for individual category

More
11 years 5 months ago #197918 by info@vesica.org
-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4

Hi,

could you please tell me how can I resize the product image on product page for an individual category?

thanks!

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

More
11 years 5 months ago #197922 by nicolas
Hi,

There is no option for that.
You would have to force the image size based on the category with custom code added to the show_block_img file of the product view via the menu Display>Views.
You'll want to change that code:
Code:
$height = (int)$this->config->get('product_image_y'); $width = (int)$this->config->get('product_image_x');

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

More
11 years 5 months ago #198101 by info@vesica.org
Hi,

how can I pull the category inside the file?

Could you please tell me what code to use to request the category name?

thanks!

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

More
11 years 5 months ago #198129 by nicolas
Hi,

In $this->categories you have an array of objects and each object contains all the data of the categories.
So if you have only one category attached to your product, then you can use that code:
echo $this->categories[0]->category_name;
The following user(s) said Thank You: info@vesica.org

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

Time to create page: 0.159 seconds
Powered by Kunena Forum