atrr option cat

This commit is contained in:
merdan 2022-05-17 16:46:50 +05:00
parent b9d8e24d66
commit 7f6e16cf6b
1 changed files with 2 additions and 2 deletions

View File

@ -58,10 +58,10 @@ class FilterOptions extends \Webkul\RestApi\Http\Controllers\V1\Shop\ResourceCon
}
if($category = $request->input('category')){
$query->join('product_attribute_values',function ($q) use ($request){
$query->rightJoin('product_attribute_values',function ($q) use ($request){
$q->on('product_attribute_values.integer_value','=','attribute_options.id')
->where('product_attribute_values.attribute_id',$request->get('attribute_id'));
})->join('product_categories',function ($q) use($category){
})->rightJoin('product_categories',function ($q) use($category){
$q->on('product_categories.product_id','=','product_attribute_values.product_id')
->where('product_categories.category_id',$category);
});