|
@@ -29,7 +29,8 @@ class PriceController extends Controller
|
|
$agent_id = $request->input('id');
|
|
$agent_id = $request->input('id');
|
|
//dd($agent_id);die;
|
|
//dd($agent_id);die;
|
|
$search['keyword'] = $request->input('keyword');
|
|
$search['keyword'] = $request->input('keyword');
|
|
- $query = $this->repository->pushCriteria(new PriceWhere($search,$this->getStoreId(),$agent_id));
|
|
|
|
|
|
+ $search['cat_id'] = $request->input('cat_id');
|
|
|
|
+ $query = $this->repository->pushCriteria(new PriceWhere($search, $this->getStoreId(), $agent_id));
|
|
|
|
|
|
if(isset($request['sort_field']) && $request['sort_field'] && isset($request['sort_field_by'])) {
|
|
if(isset($request['sort_field']) && $request['sort_field'] && isset($request['sort_field_by'])) {
|
|
$query = $query->pushCriteria(new OrderBy($request['sort_field'],$request['sort_field_by']));
|
|
$query = $query->pushCriteria(new OrderBy($request['sort_field'],$request['sort_field_by']));
|
|
@@ -40,6 +41,9 @@ class PriceController extends Controller
|
|
foreach ($list as $item){
|
|
foreach ($list as $item){
|
|
$product = AlbumProductModel::where([['id',$item->product_id],['store_id',$this->getStoreId()]])->first();
|
|
$product = AlbumProductModel::where([['id',$item->product_id],['store_id',$this->getStoreId()]])->first();
|
|
$item->product_name = $product['name'];
|
|
$item->product_name = $product['name'];
|
|
|
|
+ $cat = AlbumCatModel::where('id', $product['cat_id'])->first();
|
|
|
|
+ $item->product_cat = $cat->name;
|
|
|
|
+ $item->product_ma_price_comment = $product['ma_price_comment'];
|
|
$item->product_pic = $product['cover_pic'];
|
|
$item->product_pic = $product['cover_pic'];
|
|
}
|
|
}
|
|
$cat = AlbumCatModel::where([['store_id',$this->getStoreId()],['parent_id',0]])->get();
|
|
$cat = AlbumCatModel::where([['store_id',$this->getStoreId()],['parent_id',0]])->get();
|