List Number Of Products¶
Use list_number_of_products
module to insert a number of products available on the currently viewed list context page.
Configuration parameters¶
none
Module source code¶
{% set numberOfProducts = ObjectApi.getProducts(systemConfig.productsCount).count %}
<span class="number-of-products {% if numberOfProducts == 0 %}number-of-products_no-results{% endif %}">
{{ translate('Products') }}:
<strong>
{{ numberOfProducts }}
{% if numberOfProducts == 0 %}({{ translate('None') }}){% endif %}
</strong>
</span>
Used Object Api methods¶
Used styles¶
Module configuration schema¶
[
{
"state": "unfolded",
"label": "General settings",
"elements": [
{
"type": "infobox",
"name": "infobox",
"options": {
"type": "blank",
"message": "#### Related settings in the admin panel%s- changing phrases in [translations](%s)",
"placeholderValues": [
"\n",
"\/admin\/configLanguages\/list"
]
}
}
]
}
]