PHP error: array_merge(): Argument #1 is not an array in mod.low_search.php#1572
Hi,
that code works, but I have new issue now.
I have a webshop and I use filters for search.
I use {exp:low_search:results} for webshop homepage, and I want to display all items from all categories when page is loaded.
I did that by clicking all categories and copy/paste query from url and putting it as parametar.
Is there more elegant way to do that, display all shop items by default?
Also
My code works well on index shop page, but when on category page, I get warnings:
A PHP Error was encountered
Severity: Warning
Message: array_merge() [function.array-merge]: Argument #1 is not an array
Filename: low_search/mod.low_search.php
Line Number: 1572
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /home/kolanz/public_html/systemxtr/codeigniter/system/core/Exceptions.php:170)
Filename: core/Common.php
Line Number: 408
I need the search results to work on all shop pages, both index and categories and I need the ability to filter products using low search filters on those pages.
This is my code: http://pastie.org/8754498
EE version: v2.7.3
Low Search version: 3.1.1
Store version: 2.2.0
Note: This topic was created from a reply on the Low Search > Keyword-less search using filters? (such as category or custom field... topic.
Replies
Low 21 Feb 2014 09:28
Can you try these two things:
1. Use just one {exp:low_search:filters} tag around the whole <nav>-element, instead of using one per each drop down.
2. To get all results when no filter selection has been made, use this for your opening Results tag:
hrvoje66 21 Feb 2014 11:49
Hi,
thanks, it helped.
Everything works fine except for one thing:
On web shop homepage and categories templates, when you only select any option in "Order by", result is strange.
It shows good order, but with lots of empty places.
Select for example "Price: High" in "Order by" on webshop homepage or category:
http://mikobijoux.com/jewelry-shop/
http://mikobijoux.com/jewelry-shop/sa...
This is output on searh results page:
http://mikobijoux.com/search-results/...
Webshop code: http://pastie.org/8755174
Search results code: http://pastie.org/8755180
Low 21 Feb 2014 12:01
Looks like you might need to add channel="shop" to the search results code, too. The Results tag is probably returning entries from all channels now.
Low 21 Feb 2014 12:04
Also, close the {if segment_2} conditional (I updated my first response).
hrvoje66 21 Feb 2014 12:08
yes, it works now
thanks a lot :)