crewsportswear update as of 3_18_19
This commit is contained in:
@@ -79,6 +79,14 @@ class TeamStoreModel extends Model {
|
||||
return $i;
|
||||
}
|
||||
|
||||
function selectDisplayCartThumb(){
|
||||
|
||||
$i = DB::table('teamstore_product_thumbnails')
|
||||
->where('ImageClass', 'active')
|
||||
->get();
|
||||
return $i;
|
||||
}
|
||||
|
||||
function myCart($cartKey){
|
||||
// echo $cartKey;
|
||||
if($cartKey != ""){
|
||||
@@ -103,15 +111,9 @@ class TeamStoreModel extends Model {
|
||||
function myCartGroup($cartKey){
|
||||
if($cartKey != ""){
|
||||
$pdo = DB::connection()->getPdo();
|
||||
$query = $pdo->prepare("SELECT *, COUNT(Id) AS qty, SUM(Price) AS total_price FROM cart_tmp WHERE CartKey = :ck GROUP BY ProductId");
|
||||
$query = $pdo->prepare("SELECT *, COUNT(Id) AS qty, SUM(Price) AS total_price, SUM(Quantity) AS total_qty FROM cart_tmp WHERE CartKey = :ck GROUP BY ProductId");
|
||||
$query->execute([':ck'=>$cartKey]);
|
||||
$row = $query->fetchAll(\PDO::FETCH_OBJ);
|
||||
// $i = DB::table('cart_tmp')->()
|
||||
// ->where('CartKey', $cartKey)
|
||||
// ->groupby('ProductId')
|
||||
// ->get();
|
||||
|
||||
// // var_dump($i);
|
||||
return $row;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user