News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

category page empty

Started by alesalva86, February 10, 2015, 11:54:59 AM

Previous topic - Next topic

alesalva86

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

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

alesalva86

Joomla 3.3.6+Virtuemart 3.0.4

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

alesalva86

I work on the site in local and so I can't tell you the URL.

GJC Web Design

if a  white screen then normally a fatal error - search on here how to trace - been mentioned dozens of times
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

alesalva86

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.

GJC Web Design

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 }  ?>
}
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

alesalva86

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?

alesalva86

Hello,
these's nobody that can help me please???? I really need to resolve this problem!!!

:( :( :(

jenkinhill

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/
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

alesalva86

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?  :(

jenkinhill

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
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum