per page zero issue fixed

This commit is contained in:
Devansh 2020-07-22 11:44:02 +05:30
parent c6e7ef3e5f
commit 9c1d908767
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ class ProductRepository extends Repository
if (core()->getConfigData('catalog.products.storefront.products_per_page')) {
$pages = explode(',', core()->getConfigData('catalog.products.storefront.products_per_page'));
$perPage = isset($params['limit']) ? $params['limit'] : current($pages);
$perPage = isset($params['limit']) ? (!empty($params['limit']) ? $params['limit'] : 9) : current($pages);
} else {
$perPage = isset($params['limit']) && !empty($params['limit']) ? $params['limit'] : 9;
}