manual item upload
This commit is contained in:
@@ -175,6 +175,7 @@ class UserModel extends Model {
|
||||
|
||||
$i = DB::table('teamstore_product_thumbnails')
|
||||
->where('ImageClass', 'active')
|
||||
->orderby('Ordering', 'ASC')
|
||||
->get();
|
||||
return $i;
|
||||
}
|
||||
@@ -216,4 +217,24 @@ class UserModel extends Model {
|
||||
|
||||
return $i;
|
||||
}
|
||||
|
||||
function selectTeamStoreName($ck){
|
||||
$pdo = DB::connection()->getPdo();
|
||||
$query = $pdo->prepare("SELECT t.StoreName FROM orders AS o INNER JOIN teamstores AS t ON t.Id = o.StoreId WHERE o.CartKey = :ck GROUP BY o.StoreId ORDER BY t.StoreName ASC");
|
||||
$query->execute(array(':ck'=>$ck));
|
||||
$row = $query->fetchAll(\PDO::FETCH_OBJ);
|
||||
return $row;
|
||||
}
|
||||
|
||||
function updateActiveThumb($id, $product_id){
|
||||
DB::table('teamstore_product_thumbnails')->where('ProductId', $product_id)
|
||||
->update(['ImageClass' => null]);
|
||||
$i = DB::table('teamstore_product_thumbnails')->where('Id', $id)
|
||||
->update(['ImageClass' => 'active']);
|
||||
}
|
||||
|
||||
function updateThumbnailOrdering($order, $id){
|
||||
$i = DB::table('teamstore_product_thumbnails')->where('Id', $id)
|
||||
->update(['Ordering' => $order]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user