VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: babu65 on October 21, 2016, 00:50:23 AM

Title: [SOLVED] Problem with the sub categories
Post by: babu65 on October 21, 2016, 00:50:23 AM
hi, I've a problem with the subcategory of products.
If I make a sub category when in the front end I display it in the parent category or into it the articles  in the bottom of page I've the following message:
QuoteNotice: Undefined property: VirtuemartViewCategory::$search in /home/responsi/public_html/templates/elegantstore/html/com_virtuemart/category/default.php on line 356

I've seen in the file at line 356 ant there is

<?php
} elseif ($this->search !== NULL) {
echo vmText::('COM_VIRTUEMART_NO_RESULT') . ($this->keyword ' : (' $this->keyword ')' '');
}

But I can't understand where is the problem.

Somebody can help me?

Many thanks in advance.
Title: Re: Problem with the sub categories
Post by: GJC Web Design on October 21, 2016, 00:59:54 AM
try with the stock  default.php file first

u give no versions etc
Title: Re: Problem with the sub categories
Post by: babu65 on October 21, 2016, 01:07:13 AM
  :-[ Sorry, I'm using Joomla 3.6.3 and VM 3.018
Sorry again, but I don't understand what have you in mind when say "try with the stock  default.php file first" :'(
Title: Re: Problem with the sub categories
Post by: babu65 on October 21, 2016, 01:15:49 AM
The error disappear if i made a product into parent category
Title: Re: Problem with the sub categories
Post by: jenkinhill on October 21, 2016, 13:16:02 PM
The error is coming from your template override:  /templates/elegantstore/html/com_virtuemart/category/default.php on line 356  not from default virtuemart. If you rename that file (on a temporary basis) then VM will use its own default.php template file instead. If the error goes away then it is a template issue and you should ask your Joomla eleganstore template provider for a fixed version.
Title: Re: Problem with the sub categories
Post by: Jumbo! on October 21, 2016, 18:40:16 PM
It is a problem if your template.

Open - templates/elegantstore/html/com_virtuemart/category/default.php

Now replace the following codes:

<?php
} elseif ($this->search !== NULL) {
echo vmText::('COM_VIRTUEMART_NO_RESULT') . ($this->keyword ' : (' $this->keyword ')' '');
}


by

<?php
} elseif (isset($this->search) && $this->search !== NULL) {
echo vmText::('COM_VIRTUEMART_NO_RESULT') . ($this->keyword ' : (' $this->keyword ')' '');
}
Title: Re: Problem with the sub categories
Post by: babu65 on October 25, 2016, 05:01:01 AM
Thanks to all for the replies,
I've following the suggestion of Jumbo, so now it's working.
Unfortunately I've a strange problem but I dont think is related at the first.
In the italian vesrsion of the site all work well, in the english I've a problem when I log in as a registered user. Infact the sub menu voices of the main voice "Products" disappear and in the main page of VM if I select a category the browser is redirect at the home page instead in to the category.
I've checked the permissions of English user groups  of VM and they are the same of Italian user groupsThe

site is http://agriturismovip.it (http://agriturismovip.it)
User: pippo
PSW: pippo1234