VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: alesalva86 on February 10, 2015, 11:54:59 AM

Title: category page empty
Post by: alesalva86 on February 10, 2015, 11:54:59 AM
Hi,
I would like to know if I have a category with no products I can see on his page on a message that says "This category is empty" ?, otherwise the page appears to me white without even the description of the category, why?

Please, someone can help me?
Thanks
Title: Re: category page empty
Post by: jenkinhill on February 10, 2015, 13:54:54 PM
http://forum.virtuemart.net/index.php?topic=79799.0
Title: Re: category page empty
Post by: alesalva86 on February 10, 2015, 14:37:49 PM
Joomla 3.3.6+Virtuemart 3.0.4
Title: Re: category page empty
Post by: jenkinhill on February 10, 2015, 15:02:28 PM
And the URL?
Title: Re: category page empty
Post by: alesalva86 on February 10, 2015, 15:08:14 PM
I work on the site in local and so I can't tell you the URL.
Title: Re: category page empty
Post by: GJC Web Design on February 10, 2015, 22:41:04 PM
if a  white screen then normally a fatal error - search on here how to trace - been mentioned dozens of times
Title: Re: category page empty
Post by: alesalva86 on February 11, 2015, 15:41:01 PM
The page is not total white like when it was an error, but the result is like in the attachment image. When the category is empty I don't see anything about the category like the description, that is my problem, if the category is empty (with no products) I'd like it to appear an inscription that says "there are no products available" or something like that. Is possible or not?

Thank you for he answer.
Title: Re: category page empty
Post by: GJC Web Design on February 11, 2015, 15:55:16 PM
at the start of the cat default template is

Quoteif (empty($this->keyword) and !empty($this->category)) {
   ?>
<div class="category_description">
   <?php echo $this->category->category_description; ?>
</div>
<?php }  ?>
}

just add an else

if (empty($this->keyword) and !empty($this->category)) {
?>
<div class="category_description">
<?php echo $this->category->category_description?>
</div>
<?php  }elseif (empty($this->keyword){ ?>
<h3>No products found!</h3>
<div class="category_description">
<?php echo $this->category->category_description?>
</div>

<?php }  ?>
}
Title: Re: category page empty
Post by: alesalva86 on February 18, 2015, 10:08:15 AM
I edited the following file C:\wamp\www\mysite\components\com_virtuemart\views\category\tmpl with the code, but doesen't work.

I editedthe wrong file?
Title: Re: category page empty
Post by: alesalva86 on February 24, 2015, 15:14:23 PM
Hello,
these's nobody that can help me please???? I really need to resolve this problem!!!

:( :( :(
Title: Re: category page empty
Post by: jenkinhill on February 24, 2015, 15:31:28 PM
Quote from: alesalva86 on February 18, 2015, 10:08:15 AM
I edited the following file C:\wamp\www\mysite\components\com_virtuemart\views\category\tmpl with the code, but doesen't work.

But C:\wamp\www\mysite\components\com_virtuemart\views\category\tmpl  is a directory, not a file. A file would be C:\wamp\www\mysite\components\com_virtuemart\views\category\tmpl\default.php

But maybe you are using template overrides? You have not said so, and nobody can see if there is not a live site url.  If you do have overrides they will be in templates/[yourjoomlatemplate/html/com_virtuemart/
Title: Re: category page empty
Post by: alesalva86 on February 25, 2015, 10:15:02 AM
Thank you for the answer,
I use the Linelabox template and I add the code at this file  C:\wamp\www\mysite\templates\mytemplate\html\com_virtuemart\category\default.php but now the category page is all white, and so the code that you suggested doesn't work.

What is the problem?  :(
Title: Re: category page empty
Post by: jenkinhill on February 25, 2015, 12:14:37 PM
Ah! You must ask the template provider, as he uses his own code for the overrides.  http://forum.virtuemart.net/index.php?topic=108212.0
Title: Re: category page empty
Post by: Linelab on February 25, 2015, 13:20:33 PM
Resolved: http://www.linelabox.com/support/category-page-empty