Merge pull request #1151 from rahulshukla-webkul/development

Development
This commit is contained in:
Jitendra Singh 2019-07-05 14:18:13 +05:30 committed by GitHub
commit aae9ffa9a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 3 deletions

View File

@ -37,16 +37,26 @@ class ProductFlatRepository extends Repository
}
/**
* Maximum Price of Prodcut
* Maximum Price of Category Prodcut
*
* @param int $categoryId
* return integer
*/
public function getMaximumPrice($categoryId)
public function getCategoryProductMaximumPrice($categoryId)
{
return $this->model
->leftJoin('product_categories', 'product_flat.product_id', 'product_categories.product_id')
->where('product_categories.category_id', $categoryId)
->max('price');
}
/**
* Maximum Price of Prodcut
*
* return integer
*/
public function getProductMaximumPrice()
{
return $this->model->max('price');
}
}

View File

@ -146,7 +146,7 @@
0,
0
],
max: {{ core()->convertPrice($productFlatRepository->getMaximumPrice($category->id)) }},
max: {{ isset($category) ? core()->convertPrice($productFlatRepository->getCategoryProductMaximumPrice($category->id)) : core()->convertPrice($productFlatRepository->getProductMaximumPrice()) }},
processStyle: {
"backgroundColor": "#FF6472"
},