Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
12 Trả lời
5924 Lượt xem

Hi,

i've set to show attribute's filters on webshop but i've some attribute that i would hide.

For ex i have:

Color, size, lenght etc.. how can i hide color and size only?

my website test is on: http://188.213.166.234:8069/shop


thank's

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Use the corresponding attribute type (empty or "hidden") depending on your Odoo version.


Ảnh đại diện
Huỷ bỏ
Tác giả

odoo 11

Check it yourself, it is obvious.

Tác giả

how can i hidden attribute?

As I said, by selecting the corresponding attribute type for the attribute you want to hide.

Tác giả

I did not understand where to do this thing

Go to "Sales/Configuration/Attributes".

Tác giả

aa ok easy but it give the description without values, there is a method to hide also the description?

I didn't know about that option, nice !

Tác giả

but if i'll do this Use the corresponding attribute type (empty or "hidden") depending on your Odoo version. odoo hide attribute also in the product not only in the search

Câu trả lời hay nhất

You need to hack the emplate website_sale.products_attributes (in website_sale addon). Curently the template contain a  t-foreach="attributes" loop. This should be change to select wanted attributes only.

Ảnh đại diện
Huỷ bỏ
Tác giả

thank you very much for the answer, but could you explain the procedure to me?

Câu trả lời hay nhất

Make condition to fetch attributes as

<t t-foreach="attributes" t-as="a">
<li t-if="a.value_ids and len(a.value_ids) &gt; 1 and not a.name in ['size', 'color']" >
....



Ảnh đại diện
Huỷ bỏ