VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: trevorellis on February 11, 2019, 00:55:00 AM

Title: 'Array' text appearing next to search bar / PREVIOUS FORUM FIXES HAVE NOT WORKED
Post by: trevorellis on February 11, 2019, 00:55:00 AM
Hello, we are using version 3.4.2. of Virtuemart and the JA Megastore template. For some reason on the page displaying the products and product categories, the word 'Array' is appearing next to the search bar.

You can see our website here: https://courtyardbeautysalon.com/index.php/shop

We followed the instructions on the forum post here: http://forum.virtuemart.net/index.php?topic=140113.0. However, it has not worked.

We have other websites that use Virtuemart and so far this is the only time that this has happened. We would like to get this issue fixed as quickly as possible please so any help would be greatly appreciated.
Title: Re: 'Array' text appearing next to search bar / PREVIOUS FORUM FIXES HAVE NOT WORKED
Post by: Jörgen on February 11, 2019, 07:58:20 AM
I would suspect that this has to do with your category template
tempaltes/your-template/html/com_virtuemart/category/your_used_template_file_if_different_from_default.php (http://tempaltes/your-template/html/com_virtuemart/category/your_used_template_file_if_different_from_default.php)

Probably needs to be updated.

Jörgen @ Kreativ Fotografi
Title: Re: 'Array' text appearing next to search bar / PREVIOUS FORUM FIXES HAVE NOT WORKED
Post by: trevorellis on February 11, 2019, 10:36:42 AM
Hello, thank you very much for your response. In /templates/ja-megastore/html/com_virtuemart/category/ we are using default.php and there is no other file in that folder. What else can we try to fix this issue?
Title: Re: 'Array' text appearing next to search bar / PREVIOUS FORUM FIXES HAVE NOT WORKED
Post by: Jörgen on February 11, 2019, 11:07:27 AM
Check the default.php taht is used. If You an get rid of the Array by commenting out the Search code, very approx line 130, then You have isolated the issue.
Turning off search in the configuration for this view would also work. Then it is time to change the code in the default.php for the Megastore template.
You can also rename the default.php to default-org.php to isolate the problem.

mörgen @ Kreativ Fotografi
Title: Re: 'Array' text appearing next to search bar / PREVIOUS FORUM FIXES HAVE NOT WORKED
Post by: trevorellis on February 11, 2019, 16:20:20 PM
I opened the file templates/ja_megastore/html/com_virtuemart/category/default.php

I have copied the code from line 130 to end:

   echo shopFunctionsF::renderVmSubLayout($this->productsLayout,array('products'=>$this->products,'currency'=>$this->currency,'products_per_row'=>$this->perRow,'showRating'=>$this->showRating));

if(!empty($this->orderByList)) { ?>

<div class="vm-pagination pagination-wrap">
   <?php echo $this->vmPagination->getPagesLinks (); ?>
   <?php if( $this->vmPagination->getPagesCounter() ): ?><div class="counter"><?php echo $this->vmPagination->getPagesCounter(); ?></div><?php endif; ?>
</div>

   <?php }
} elseif ($this->keyword !== false) {
   echo vmText::_ ('COM_VIRTUEMART_NO_RESULT') . ($this->keyword ? ' : (' . $this->keyword . ')' : '');
}
?>
</div>

<?php } ?>
</div>

<?php
if(VmConfig::get ('jdynupdate', TRUE)){
   $j = "Virtuemart.container = jQuery('.category-view');
   Virtuemart.containerSelector = '.category-view';";

   //vmJsApi::addJScript('ajaxContent',$j);
}
?>
<!-- end browse-view -->


What code should I change? Please help.
Title: Re: 'Array' text appearing next to search bar / PREVIOUS FORUM FIXES HAVE NOT WORKED
Post by: GJC Web Design on February 11, 2019, 16:54:55 PM
compare your file to the standard default.php file
Title: Re: 'Array' text appearing next to search bar / PREVIOUS FORUM FIXES HAVE NOT WORKED
Post by: Jörgen on February 11, 2019, 17:17:41 PM
Good advise from GJC.

You have a commercial Template that needs adjusting / updating. If You can not make the code adjustments I suggest You talk with Your template provider.

Jörgen @ Kreativ Fotografi
Title: Re: 'Array' text appearing next to search bar / PREVIOUS FORUM FIXES HAVE NOT WORKED
Post by: Milbo on February 11, 2019, 19:29:52 PM
Should be a 20 euro fix, if there is no warranty. Maybe 50(at least you say it is not the problem described in the FAQ), not more.
Title: Re: 'Array' text appearing next to search bar / PREVIOUS FORUM FIXES HAVE NOT WORKED
Post by: trevorellis on February 24, 2019, 14:16:35 PM
We have resolved the issue by getting support from the people that deal with the Megastore template. Thanks for your help.