This commit is contained in:
tmStore 2023-09-05 15:01:50 +05:00
commit 1391e7621a
2 changed files with 2 additions and 1 deletions

View File

@ -159,7 +159,7 @@ class SellerProduct extends SellerProductController
$seller = $this->sellerRepository->isSellerMarket($request->get('seller_id'));
if ($seller) {
$orders = SellerOrderModel::where('marketplace_seller_id', $seller->id)->with('order.customer')->paginate(15);
$orders = SellerOrderModel::where('marketplace_seller_id', $seller->id)->orderByDesc('created_at')->with('order.customer')->paginate(15);
return response($orders);
} else {
return response([

View File

@ -40,6 +40,7 @@ class Product extends JsonResource
'sku' => $product->sku,
'type' => $product->type,
'name' => $product->name,
'categories' => $product->categories,
'url_key' => $product->url_key,
'price' => core()->convertPrice($productTypeInstance->getMinimalPrice()),
'formatted_price' => core()->currency($productTypeInstance->getMinimalPrice()),