{% spaceless %} {# @var obActiveCategory \Lovata\Shopaholic\Classes\Item\CategoryItem #} {# Get product collection #} {% set obProductList = ProductList.make().active().sort(ProductList.getSorting()).category(obActiveCategory.id, true) %} {% if obBrand.isNotEmpty() %} {% set obProductList = obProductList.brand(obBrand.id) %} {% endif %} {# Get array with pagination buttons #} {% set iPage = Pagination.getPageFromRequest() %} {# Apply pagination to product collection and get array with product items #} {% set arProductList = obProductList.page(iPage, Pagination.getCountPerPage()) %} {% if arProductList is not empty %}