Closed (fixed)
Project:
Search Autocomplete
Version:
7.x-3.3
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 Nov 2013 at 08:59 UTC
Updated:
13 Nov 2013 at 15:34 UTC
Jump to comment: Most recent
Comments
Comment #1
tm01xx commentedOh, i found that i have to check the title to be a link. If i let the title as plain text the result will be empty.
Comment #2
dom. commentedHi !
I never used Drupal Commerce, so you will have to help me with this !
First of all, yes you can use Search Autocomplete to achieve what you need.
Here is what I have done :
- Install the latest Commerce
- Install Commerce Devel
- Using Devel Generate I have generated 50 products
Now build the view :
- Go to view and create a new one called "autocomplete-products"
- Use the Autocomplete JSON style on fields
- Remove all pagination settings
- Add the field "Product title" with option "linked to it's content"
- Add a filter on title with option "contains", expose it to users and call it's identifier "filter"
Check that you have some data at /autocomplete-products.
Now configure Search Autocomplete :
- Go to admin/config/search/search_autocomplete
- Change for instance the "Search Block" to use the callback "autocomplete-products?filter="
It should now work !
I don't understand the difference between Commerce Product and Product nodes. What I gave you will link you to the product page (the one where you can modify the product). I do suppose this is not what you need for your end-user. Have you created a "product" node type with some fields linked to a product or something that kind ?
Miro.
Comment #3
dom. commentedYes indeed exactly you should have to link the title to it's content.
Please also note that I will soon release a 4.x branch where you will be able to add multiple fields in your completion. For instance a product image, the product name and it's price.
Miro.
Comment #4
tm01xx commentedThanks Domi, yes it works perfectly when setting the title with link. Including image into the suggested result is a long waiting feature. Really expect that one release soon :-)
Best regards,
Comment #5
dom. commentedHi !
You can already try it using the 7.x-4.0-alpha1. The more tester there will be, the sooner stable version will be released !
Comment #6
dom. commented