Hi,
Is it possible to display a message when a category is empty?? I have searched but not found any answer for VM2!!
Please see the site in development here: http://new.bfplantsales.com/stock
When you go to an empty category, you just get a blank page!!
Thanks
Gareth
nice link. deosn't work.
Hi, sorry the temp domain was removed and site went live... please try http://www.bfplantsales.com/stock
thanks
Any ideas? thanks
Hi gpullen,
yeah you need to edit the following file "/components/com_virtuemart/views/category/tmpl/default.php" @ line 319 (right at the bottom). Look for :
<?php } elseif ($this->search !==null ) echo JText::_('COM_VIRTUEMART_NO_RESULT').($this->keyword? ' : ('. $this->keyword. ')' : '')
?>
change to :
<?php
} elseif ($this->search !==null ) {
echo JText::_('COM_VIRTUEMART_NO_RESULT').($this->keyword? ' : ('. $this->keyword. ')' : '');
} else {
echo 'CATEGORY EMPTY';
};
?>
I hope this helps.
Why is this code NOT into the product yet........... every shop owner wants to give info to their customer.
Can this be proposed, so it will be in the next VM version ?
This is a better code I think.
Because when there are Child category's the text should not be visible for me.
<?php
} elseif ($this->search !==null ) {
echo JText::_('COM_VIRTUEMART_NO_RESULT').($this->keyword? ' : ('. $this->keyword. ')' : '');
} elseif (!$this->category->haschildren) {
echo 'CATEGORY EMPTY<br><a href = "javascript:history.back()">Back to previous page</a>';
};
?>
thanks ocean1. works great