diff --git a/app/store/lists/cart/CartList.php b/app/store/lists/cart/CartList.php index bfa55e9de..f136bdfcc 100644 --- a/app/store/lists/cart/CartList.php +++ b/app/store/lists/cart/CartList.php @@ -49,7 +49,7 @@ class CartList extends BaseAdminDataLists implements ListsSearchInterface, Lists 'is_pay' => 0 ]; $list = Cart::where($this->searchWhere)->where($where) - ->limit($this->limitOffset, $this->limitLength) + ->limit(100) ->order(['id' => 'desc']) ->select()->each(function ($item) { @@ -91,7 +91,14 @@ class CartList extends BaseAdminDataLists implements ListsSearchInterface, Lists $item['image'] = $find['image']; $item['cost'] = $find['cost']; $item['store_name'] = $find['store_name']; - $item['unit_name'] = StoreProductUnit::where('id', $find['unit'])->value('name'); + $unit = StoreProductUnit::where('id', $find['unit'])->find(); + if($unit){ + $item['unit_name']=$unit['name']; + $item['is_bulk']=$unit['is_bulk']; + }else{ + $item['unit_name']=''; + $item['is_bulk']=0; + } } } return $list;