|
|
@@ -68,7 +68,10 @@ class FilterableAttributesProvider implements ProviderInterface
|
|
|
$customerGroup = core()->getGuestCustomerGroup();
|
|
|
|
|
|
$maxPriceQuery = Product::query()
|
|
|
- ->leftJoin('product_price_indices', 'products.id', 'product_price_indices.product_id')
|
|
|
+ ->leftJoin('product_price_indices', function ($join) {
|
|
|
+ $join->on('products.id', '=', 'product_price_indices.priceable_id')
|
|
|
+ ->where('product_price_indices.priceable_type', '=', \Webkul\Product\Models\Product::class);
|
|
|
+ })
|
|
|
->leftJoin('product_categories', 'products.id', 'product_categories.product_id')
|
|
|
->where('product_price_indices.customer_group_id', $customerGroup->id);
|
|
|
|