Hello, everybody !
I would like to make a simple thing (well I thought it would be simple :()... I would like to use the virtuemart module category to show, in an article, some child category of a parent with their own thumbnails... unfortunately this module can't do this... Only the title with an url is shown....
Is there anybody who have already makes this change ? I will appreciate any help :)
Thank you !
I'm not a developper... but I know how to create an image... the only things that I need is the way to write the url...
I've added to 'foreach ($categories as $category)'
$Zecatimg = '<img alt="" src="'.JURI::base(true).'/'.$c->images[0]->file_url_thumb.'" />';
and then for each <li> :
<?php echo '<div>'.$Zecatimg.'</div>'; ?>
But it doesn't work... I don't have the url... The source code gives me this :
<div><img alt="" src="/" /></div>
Would be great if a nice developper could help me ;D
Nobody want to give me a hand on this issue ?
please I really need to do this...
http://forum.virtuemart.net/index.php?topic=104795.0
Ok I found by my own way...
I don't know if it's really good to do like this but in mod_virtuemart_category.php there was some lines which was commented... so I removed comments and I modified default.php like this :
<ul class="VMmenu<?php echo $class_sfx ?>" id="<?php echo "VMmenu".$ID ?>" >
<?php foreach ($categories as $category) {
$active_menu = 'class="VmClose"';
$caturl = JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id='.$category->virtuemart_category_id);
$cattext = $category->category_name;
$Zecatimg = '<div><a href="'.$caturl.'" title="'.$cattext.'"><img alt="" src="'.JURI::base(true).'/'.$category->images[0]->file_url_thumb.'" /></a></div>';
//if ($active_category_id == $category->virtuemart_category_id) $active_menu = 'class="active"';
if (in_array( $category->virtuemart_category_id, $parentCategories)) $active_menu = 'class="VmOpen"';
?>
<li>
<div >
<h2><?php echo JHTML::link($caturl, $cattext);?></h2>
<?php echo '<div>'.$Zecatimg.'</div>' ;?>
</div>
Now that's done, I get the category image with a link to the category :)