4_15_2019 update

This commit is contained in:
Frank John Begornia
2019-04-15 22:38:53 +08:00
parent 0fe1270756
commit c5862dfbf4
665 changed files with 401297 additions and 194 deletions

View File

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