4_15_2019 update
This commit is contained in:
@@ -17,6 +17,7 @@ class TeamStoreModel extends Model {
|
||||
{
|
||||
$i = DB::table('teamstore_products')
|
||||
->where($field, $teamstoreId)
|
||||
->orderBy('Id', 'ASC')
|
||||
->orderBy('Ordering', 'ASC')->get();
|
||||
return $i;
|
||||
}
|
||||
@@ -111,7 +112,7 @@ class TeamStoreModel extends Model {
|
||||
function myCartGroup($cartKey){
|
||||
if($cartKey != ""){
|
||||
$pdo = DB::connection()->getPdo();
|
||||
$query = $pdo->prepare("SELECT *, COUNT(Id) AS qty, SUM(Price) * Quantity AS total_price FROM cart_tmp WHERE CartKey = :ck GROUP BY ProductId");
|
||||
$query = $pdo->prepare("SELECT *, COUNT(Id) AS qty, Price * SUM(Quantity) AS total_price FROM cart_tmp 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