Page 1 of 2

Limit Product Search Suggestion to Product 'Selection' only?

Posted: 19 Sep 2016, 07:54
by ocytacus
Hi,

Thanks for building this open-source e-commerce library.

On the frontend, how can I limit product search result to return and display only 'Product Selection' type? Because I only list product 'Selection' on my website and each product 'Selection' will have a few product 'Article' linked to it.

At the moment, whenever a user search for a product on the search bar, the search result will display all the products (Article, Selection, Bundle type) associated with the search term.

Thanks in advance.

Re: Limit Product Search Result to Product 'Selection' only?

Posted: 19 Sep 2016, 08:05
by aimeos
If you don't associate the articles to a category but only the selection products, the search result will only list the selection products.

Re: Limit Product Search Result to Product 'Selection' only?

Posted: 19 Sep 2016, 10:32
by ocytacus
aimeos wrote:If you don't associate the articles to a category but only the selection products, the search result will only list the selection products.
Hi, thanks for the fast response.

I had only associated selection products to my category, but for unknown reasons, all these article products keep showing up in my search result.

Any suggestions how I can debug this?

Re: Limit Product Search Result to Product 'Selection' only?

Posted: 19 Sep 2016, 11:16
by aimeos
First have a look at the mshop_index_catalog table and check if the product IDs are for selection products only.

Re: Limit Product Search Result to Product 'Selection' only?

Posted: 19 Sep 2016, 11:32
by ocytacus
Hi, sorry. Just to clarify, it's my search suggestion that is having the problem, not the search result. The search result displays all the selection products. (I'll edit post title)

As you can see here below, the search result returns 2 selection products which is correct.
Image

But, when I type 'kraft' into the search bar, the suggestions will include article products.
Image

So, how do I limit product search suggestions to selection products only?
Everything looks okay in my mshop_index_catalog table.

Re: Limit Product Search Suggestion to Product 'Selection' o

Posted: 19 Sep 2016, 13:09
by aimeos
Which Aimeos Laravel version do you use?

Re: Limit Product Search Suggestion to Product 'Selection' o

Posted: 19 Sep 2016, 13:53
by ocytacus
aimeos wrote:Which Aimeos Laravel version do you use?
The latest dev version, I think. Composer Update installed the dev version by mistake after I include

Code: Select all

"aimeos/ai-payments": "dev-master"
in my composer.json the other day.

Should I reinstall my Aimeos package to fix this?

Re: Limit Product Search Suggestion to Product 'Selection' o

Posted: 19 Sep 2016, 14:50
by aimeos
That would only help temporarily if we don't find the underlying problem. Please have a look into the mshop_index_text table. Are there all article names listed for one selection product?

Re: Limit Product Search Suggestion to Product 'Selection' o

Posted: 19 Sep 2016, 15:19
by ocytacus
aimeos wrote:That would only help temporarily if we don't find the underlying problem. Please have a look into the mshop_index_text table. Are there all article names listed for one selection product?
Yes, I can see all the article products' and selection products' names in the value column

Code: Select all

SELECT * FROM x.mshop_index_text where type="name" and domain="product"
Is that the symptom of the problem?

Re: Limit Product Search Suggestion to Product 'Selection' o

Posted: 19 Sep 2016, 15:35
by aimeos
Yes, it is. I assume you haven't added any configuration to your config/shop.php file that includes an "index" part?