Merge pull request #4617 from nikolayandreev/master
Fix getMaximamPrice returning Special price, and add capability to filter products via ?category_id=1,2,3 instead of ?category_id=1 while using getAll()
This commit is contained in:
commit
0f6d3d3253
|
|
@ -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')) {
|
||||
|
|
|
|||
|
|
@ -288,4 +288,14 @@ class Downloadable extends AbstractType
|
|||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get product maximam price
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getMaximamPrice()
|
||||
{
|
||||
return $this->product->price;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,4 +63,14 @@ class Simple extends AbstractType
|
|||
|
||||
return $qty <= $this->totalQuantity() ? true : $backorders;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get product maximam price
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getMaximamPrice()
|
||||
{
|
||||
return $this->product->price;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,4 +71,14 @@ class Virtual extends AbstractType
|
|||
{
|
||||
return $qty <= $this->totalQuantity() ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get product maximam price
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getMaximamPrice()
|
||||
{
|
||||
return $this->product->price;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue