- Posts: 162
- Thank you received: 0
Resize product image for individual category
- info@vesica.org
-
Topic Author
- Offline
Less
More
11 years 5 months ago #197918
by info@vesica.org
Resize product image for individual category was created 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!
-- 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.
11 years 5 months ago #197922
by nicolas
Replied by nicolas on topic Resize product image for individual category
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:
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.
- info@vesica.org
-
Topic Author
- Offline
Less
More
- Posts: 162
- Thank you received: 0
11 years 5 months ago #198101
by info@vesica.org
Replied by info@vesica.org on topic Resize product image for individual category
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!
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.
11 years 5 months ago #198129
by nicolas
Replied by nicolas on topic Resize product image for individual category
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;
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