News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

[solved] Different thumb resize options

Started by mingrz, December 20, 2012, 00:26:58 AM

Previous topic - Next topic

mingrz

Hi everybody and thanks for all the times you helped me to find a solution simply searching through topics.
My problem is I set a resize size for my thumbs and it's fine for all the different pages, except for the "featured products" module I have ona my homepage.
There I would need a different thumbnail size.
Is there a way to create two (or more) resize options to be chosen when needed and, if to do this it will need to modify administrator-folder files, It would be possible to override them to allow system upgrade?
Please excuse me if my English got problems :)
Davide.

bytelord

Hello,

You could make some CSS adjustment over there, use firebug to examine your site code and styling : http://forum.virtuemart.net/index.php?topic=102850.0
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

mingrz

Hi bytelord and thank for your reply.
I already use firebug and other tools like this. I also have good html/css skills. I'm not as good with php. Since my main thumb size is 120X120, and for the module I need a bigger size, I think that I will have some quality loss if I make the thumb bigger via css. Is there a way to duplicate the resize function via php so that I can call two different functions that give me different sizes?

bytelord

Hello,

That will need a lot of code modifications of the core .... you could use the full image and adjust it with css.

To override the products module template just copy the file located under
joomla_root_folder\modules\mod_virtuemart_product\tmpl\default.php
to
joomla_root_folder\templates\your_joomla_template\html\mod_virtuemart_product\default.php
Create the folder is doesn't exist on the destination
Edit the file and around line 25 and 72 you will find the same line (because the first is for div and the second for list display style)

$image = $product->images[0]->displayMediaThumb ('class="featuredProductImage" border="0"', FALSE);

use displayMediaFull instead of mediathumb:

$image = $product->images[0]->displayMediaFull ('class="featuredProductImage" border="0"', FALSE);

Now you can easily adjust your CSS.

You can find that information on FAQ for the images displayed on product details page: http://forum.virtuemart.net/index.php?topic=98647.0

Some more information regarding template overrides (not modules, but views of virtuemart):
Creating Template overrides: https://forum.virtuemart.net/index.php?topic=98505.0
Template System: https://dev.virtuemart.net/projects/virtuemart/wiki/Hints_for_the_use_of_the_template_system

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

mingrz

Thanks, I'm gonna try this solution.  :)