added qr on reports
This commit is contained in:
@@ -38,7 +38,7 @@ class AdminModel extends Model
|
||||
|
||||
function itemGroup($cartKey){
|
||||
$pdo = DB::connection()->getPdo();
|
||||
$query = $pdo->prepare("SELECT *, COUNT(Id) AS qty, Price * SUM(Quantity) AS total_price FROM orders WHERE CartKey = :ck GROUP BY ProductId");
|
||||
$query = $pdo->prepare("SELECT orders.*, COUNT(orders.Id) AS qty, orders.Price * SUM(orders.Quantity) AS total_price, teamstores.StoreName FROM orders LEFT JOIN teamstores on teamstores.Id = orders.StoreId WHERE CartKey = :ck GROUP BY ProductId");
|
||||
$query->execute([':ck'=>$cartKey]);
|
||||
$row = $query->fetchAll(\PDO::FETCH_OBJ);
|
||||
return $row;
|
||||
|
||||
Reference in New Issue
Block a user