crewsportswear update as of 3_18_19
This commit is contained in:
@@ -65,9 +65,9 @@ class UserModel extends Model {
|
||||
return $i;
|
||||
}
|
||||
|
||||
function selectPaymentDetails($userid){
|
||||
function selectPaymentDetails($field, $val){
|
||||
|
||||
$i = DB::table('payment_details')->where('UserId', $userid)
|
||||
$i = DB::table('payment_details')->where($field, $val)
|
||||
->get();
|
||||
|
||||
return $i;
|
||||
@@ -134,4 +134,28 @@ class UserModel extends Model {
|
||||
|
||||
return $i;
|
||||
}
|
||||
|
||||
function selectOrderItem($ck){
|
||||
$i = DB::table('orders')
|
||||
->where('CartKey', $ck)
|
||||
->get();
|
||||
return $i;
|
||||
}
|
||||
|
||||
function itemGroup($cartKey){
|
||||
$pdo = DB::connection()->getPdo();
|
||||
$query = $pdo->prepare("SELECT *, COUNT(Id) AS qty, SUM(Price) AS total_price, SUM(Quantity) AS total_qty FROM orders WHERE CartKey = :ck GROUP BY ProductId");
|
||||
$query->execute([':ck'=>$cartKey]);
|
||||
$row = $query->fetchAll(\PDO::FETCH_OBJ);
|
||||
return $row;
|
||||
|
||||
}
|
||||
|
||||
function selectDisplayItemThumb(){
|
||||
|
||||
$i = DB::table('teamstore_product_thumbnails')
|
||||
->where('ImageClass', 'active')
|
||||
->get();
|
||||
return $i;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user