diff --git a/packages/Webkul/Product/src/Repositories/ProductRepository.php b/packages/Webkul/Product/src/Repositories/ProductRepository.php index dbbc10a50..4da361477 100755 --- a/packages/Webkul/Product/src/Repositories/ProductRepository.php +++ b/packages/Webkul/Product/src/Repositories/ProductRepository.php @@ -129,7 +129,7 @@ class ProductRepository extends Repository } /** - * @param int $categoryId + * @param string $categoryId * * @return \Illuminate\Support\Collection */ @@ -162,7 +162,7 @@ class ProductRepository extends Repository ->whereNotNull('product_flat.url_key'); if ($categoryId) { - $qb->where('product_categories.category_id', $categoryId); + $qb->whereIn('product_categories.category_id', explode(',', $categoryId)); } if (! core()->getConfigData('catalog.products.homepage.out_of_stock_items')) { diff --git a/packages/Webkul/Product/src/Type/Downloadable.php b/packages/Webkul/Product/src/Type/Downloadable.php index d35b2ba69..101df5a8e 100644 --- a/packages/Webkul/Product/src/Type/Downloadable.php +++ b/packages/Webkul/Product/src/Type/Downloadable.php @@ -288,4 +288,14 @@ class Downloadable extends AbstractType return $result; } + + /** + * Get product maximam price + * + * @return float + */ + public function getMaximamPrice() + { + return $this->product->price; + } } diff --git a/packages/Webkul/Product/src/Type/Simple.php b/packages/Webkul/Product/src/Type/Simple.php index 03eb5ccf8..100b2a228 100644 --- a/packages/Webkul/Product/src/Type/Simple.php +++ b/packages/Webkul/Product/src/Type/Simple.php @@ -63,4 +63,14 @@ class Simple extends AbstractType return $qty <= $this->totalQuantity() ? true : $backorders; } -} \ No newline at end of file + + /** + * Get product maximam price + * + * @return float + */ + public function getMaximamPrice() + { + return $this->product->price; + } +} diff --git a/packages/Webkul/Product/src/Type/Virtual.php b/packages/Webkul/Product/src/Type/Virtual.php index 50d5fac91..f8accd9db 100644 --- a/packages/Webkul/Product/src/Type/Virtual.php +++ b/packages/Webkul/Product/src/Type/Virtual.php @@ -71,4 +71,14 @@ class Virtual extends AbstractType { return $qty <= $this->totalQuantity() ? true : false; } -} \ No newline at end of file + + /** + * Get product maximam price + * + * @return float + */ + public function getMaximamPrice() + { + return $this->product->price; + } +}