Limit Product Search Suggestion to Product 'Selection' only?

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
ocytacus
Posts: 9
Joined: 19 Sep 2016, 07:43

Limit Product Search Suggestion to Product 'Selection' only?

Post by ocytacus » 19 Sep 2016, 07:54

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.
Last edited by ocytacus on 19 Sep 2016, 11:33, edited 1 time in total.

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

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

Post by aimeos » 19 Sep 2016, 08:05

If you don't associate the articles to a category but only the selection products, the search result will only list the selection products.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

ocytacus
Posts: 9
Joined: 19 Sep 2016, 07:43

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

Post by ocytacus » 19 Sep 2016, 10:32

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?

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

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

Post by aimeos » 19 Sep 2016, 11:16

First have a look at the mshop_index_catalog table and check if the product IDs are for selection products only.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

ocytacus
Posts: 9
Joined: 19 Sep 2016, 07:43

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

Post by ocytacus » 19 Sep 2016, 11:32

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.

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

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

Post by aimeos » 19 Sep 2016, 13:09

Which Aimeos Laravel version do you use?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

ocytacus
Posts: 9
Joined: 19 Sep 2016, 07:43

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

Post by ocytacus » 19 Sep 2016, 13:53

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?

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

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

Post by aimeos » 19 Sep 2016, 14:50

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?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

ocytacus
Posts: 9
Joined: 19 Sep 2016, 07:43

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

Post by ocytacus » 19 Sep 2016, 15:19

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?

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

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

Post by aimeos » 19 Sep 2016, 15:35

Yes, it is. I assume you haven't added any configuration to your config/shop.php file that includes an "index" part?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply