VirtueMart Forum

VirtueMart 2 + 3 + 4 => Frontend Modules => Topic started by: illeven_Paris on January 30, 2014, 20:37:31 PM

Title: Featured Products module title to be a link to category
Post by: illeven_Paris on January 30, 2014, 20:37:31 PM
Hello,

I have created a products module and made it featured.

What i need is to make the module title ($headerText) a link in order when the user clicks this to be transferred to the specific category.

What i have done until now is to make some changes in mod_virtuemart_product/tmpl/default.php

<?php if ($headerText) {
      $catURL =  JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id='.$headerText);
      
   }else {
      $catURL =  JRoute::_('index.php?option=com_virtuemart');
      
   }?>
   <div class="vmheader"><a href="<?php echo $catURL ?>" > <?php echo $headerText ?></a></div>


But the result is when you click this to go into the parent of the categories page. 

Any help would be appreciated!

Thanks