added order status list

This commit is contained in:
franknstayn
2022-02-03 20:18:00 +08:00
parent 65123a7ccf
commit f2dd4d2937
7 changed files with 517 additions and 148 deletions

View File

@@ -601,4 +601,28 @@ class AdminModel extends Model
return $i;
}
function selectHomeCarousel()
{
$i = DB::table('home_carousel')->get();
return $i;
}
function selectOrderStatus()
{
$i = DB::select("SELECT t.StoreName, pd.InvoiceNumber, o.ProductName, (
SELECT ts.StepLabel
FROM tracking AS tr
LEFT JOIN tracking_steps AS ts ON tr.StepId = ts.Id
WHERE tr.InvoiceNumber = pd.InvoiceNumber
ORDER BY tr.StepId DESC
LIMIT 1
) AS OrderStatus, pd.DateCreated
FROM orders AS o
INNER JOIN teamstores AS t ON t.Id = o.StoreId
INNER JOIN payment_details AS pd ON pd.CartKey = o.CartKey");
return $i;
}
}