on master help sign in
products results: add possibility to show if a product is in stock or not.. (#3120)
commitd1f6e0a3b1f6e40597e8e15ca992599f26e6b720 authorDario Nuevo <dn@xbe.ch> dateTue 11 Jan 2022, 22:39 (5 years ago) parent1b1eaa6
1 file changed+2−1
searx/templates/oscar/result_templates/products.html+2−1
searx/templates/oscar/result_templates/products.html+2−1
@@ -1,4 +1,4 @@
1−{% from 'oscar/macros.html' import draw_favicon, result_header, result_sub_header, result_footer_rtl, result_footer %}
1+{% from 'oscar/macros.html' import draw_favicon, icon, result_header, result_sub_header, result_footer_rtl, result_footer %}
22
33{{ result_header(result, favicons) }}
44{{ result_sub_header(result) }}
@@ -11,6 +11,7 @@
1111 {% if result.shipping %}<small>{{ result.shipping|safe }}</small></br>{% endif %}
1212 {% if result.source_country %}<small>{{ result.source_country|safe }}</small></br>{% endif %}
1313 {% if result.content %}{{ result.content|safe }}{% endif %}
14+ {% if result.has_stock is defined %}<br>{% if result.has_stock %}{{ icon('check', _('Has stock')) }}{% else %}{{ icon('alert', _('Out of stock')) }}{% endif %}{% endif %}
1415 </p>
1516 </div>
1617</div>