There is such a list of objects displayed by the value of the attributes of goods.
the values of the attributes of goods that are interconnected - should be in the form of a drop -down SELECT (OPTION) list/dropdownMenu, i.e. - For example, instead of Size: Medium, Size: Small it should just be
mediumsmall Pre> that these values of the attributes are applied SIZE can be specified inside TemPlates (Label), i.e. This is not so important, the main thing is how they can be placed in this Select list (dropdown menu).
I want to add that I tried to change the values that are indicated by the default, in TemPlates, instead of checkboxes - I tried to indicate Select Option, but the result was obtained Inappropriate
.
tamplates h2>
browse.html:
{% for field, Data in fact_data.items %} { % ""> if> data.results %} r { % include 'search/partials/fact.html' with name = data.name items = data.ressults %} { % endfor %} Pre> facet.html:
{ % for item in items %} & lt; dd & gt; & lt; input class = "" Facet_checkbox "" type = name = " "{ithem.name }} "" /& gt; & lt; input class = type = name = "" url_for _ {item.name}} "" values = " "" {{{{{{{{{{{{{{{ item.select_url}}} "" /& gt; & lt; a href = "" {{item.select_url}} "" " & gt; {ithem.name }} & lt;/a & gt; {% if item.show_count%} ({item.count}}) {% endif %} & lt;/dd & gt;
Product Class is a class of all products (goods) used for indexing, filter. Next is simply a clarification of the values that need to be displayed (in my case, these are the values of the attributes)
search_indexes.py
class productindex (indexes.searchindex, indexes.indexable): Product_class = indexes.multivaluefield (null = true ) r def prepare_product_class ( self, obj ): Attributes = obj.attribute_values. all () if len (attributes) & gt; 0 : retu [protout_class for product_class in Attributes] PRE>
question@mail.ru
·