crewsportswear update as of 3_18_19

This commit is contained in:
Frank John Begornia
2019-03-18 13:48:37 +08:00
parent 562f03488a
commit a2d88bc52e
71 changed files with 5443 additions and 85 deletions

View File

@@ -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;
}
}