开发者

Magento: How to show only products with a custom binary attribute

I created some custom attributes for my Products in the backend, put together in a single attribute set. Attributes are like:

"Can be used to fill holes in teeth" "Can be used to to cover up fillings" "Is absorbable"

All of those attributes are of the "yes/no" kind.

I made all of them searchable, yet when I search for "fillings" or "teeth" or whatever they have as a text, no product is found, even so I have one product which has all of these attributes attached and all of them set to "yes".

How would I go about if I wanted to have a link that displayed 开发者_如何学运维me all products that, say, had "is absorbable" set to "yes"?


The attribute needs to have "Use in quick search" set to "Yes" in the attribute properties (e.g. under Catalog > Attributes > Manage Attributes).

If you want to link to it easily, you could also enable "Use in advanced search", and then go to http://yoururl.com/catalogsearch/advanced, search for it and then just copypaste that URL.

I use for example the following URL in our shop to link to selected products from the frontpage: http://www.k55.ch/catalogsearch/advanced/result/?front=683&mode=list

This is just a search for products where the attribute with code "front" has the value "683". Actually, 683 is an internal id that magento generates, but that doesn't really matter.


I know this has an answer but I solved this like this:

1) Create a category for the yes/no attribute but hidden from the navigation (You can set it to show in the layered navigation if you want to) 2) Add your products that have Yes in the attribute to this category. 2) Create a URL mapping to this category (Optional). Example /mycategory.html 3) Create a search term for the attribute and put the new URL mapping in the redirect page field.

I have for example a Yes/No attribute for Waterproof. My Search term is waterproof and redirects to my URL mapping of my hidden category.

Then, when someone searches for the name of the attribute it will redirect them to the category which will basically be an advanced search but customers can reach it not only from a link but from a search.

Good luck

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜