News:

Looking for documentation? Take a look on our wiki

Main Menu

No product found message

Started by techrahul87, April 24, 2012, 08:25:47 AM

Previous topic - Next topic

techrahul87

hello everyone...

I am using joomla 2.5 and virtue mart 2.0. Now i want a simple functionality in my project that if there are no products under a category there should be a message "no products found". I have been gone through code of joomla .. but have not found any thing....does any body have done that...

AbsoluteVM

#1
I created my own which might be a bit simple/crap, but it works.

I'm using template overrides, so in templates/myTemplate/html/com_virtuemart/category/default.php

I added:

<?php
// There are no products message

   if ($this->category->haschildren) {
      // don't output the message
   } else {
      echo '<h1>No products found</h1>';
   }
?>

Before
<?php
/* Show child categories */

if ( VmConfig::get('showCategory',1) ) {
   if ($this->category->haschildren) {

      // Category and Columns Counter

techrahul87

thanks AbsoluteVM ;-) nice one..