products results: add possibility to show if a product is in stock or not.. (#3120)

This commit is contained in:
Dario Nuevo 2022-01-11 22:39:08 +01:00 committed by GitHub
parent 1b1eaa6630
commit d1f6e0a3b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,4 @@
{% from 'oscar/macros.html' import draw_favicon, result_header, result_sub_header, result_footer_rtl, result_footer %}
{% from 'oscar/macros.html' import draw_favicon, icon, result_header, result_sub_header, result_footer_rtl, result_footer %}
{{ result_header(result, favicons) }}
{{ result_sub_header(result) }}
@ -11,6 +11,7 @@
{% if result.shipping %}<small>{{ result.shipping|safe }}</small></br>{% endif %}
{% if result.source_country %}<small>{{ result.source_country|safe }}</small></br>{% endif %}
{% if result.content %}{{ result.content|safe }}{% endif %}
{% if result.has_stock is defined %}<br>{% if result.has_stock %}{{ icon('check', _('Has stock')) }}{% else %}{{ icon('alert', _('Out of stock')) }}{% endif %}{% endif %}
</p>
</div>
</div>