“This category is empty” message in CMSMS Products module
I have a site where I’m using the products module. The company I’m doing it for runs specials every now and then, and wants them to show up as a page on the site. So what I did was create a category “specials”, and when a product is in that, it shows up on the products page.
However, as far as I know, there’s no default functionality to give a “This category is empty” message if there are no products in a category. And also, if a category is empty, the products module doesn’t render the template, so you can’t put some logic in there to display a “this category is empty” message.
So with a little bit of Smarty, this is how it’s done.
{capture assign="is_empty"}{Products category="Specials" summarytemplate="specials"}{/capture}
{if $is_empty != ''}{Products category="Specials" summarytemplate="specials"}{else}There are no specials on right now.{/if}



06. Aug, 2010 







About the author
No comments yet... Be the first to leave a reply!