update flat voucher
This commit is contained in:
@@ -252,14 +252,14 @@ class TeamStoreModel extends Model
|
||||
|
||||
function selectFeaturedProducts($store_id = 0)
|
||||
{
|
||||
if($store_id == 0){
|
||||
if ($store_id == 0) {
|
||||
$i = DB::select("SELECT t.StoreUrl, tp.ProductName, tp.ProductPrice, tp.ProductURL, tpt.Image FROM teamstores AS t
|
||||
INNER JOIN teamstore_products AS tp ON tp.TeamStoreId = t.Id
|
||||
INNER JOIN teamstore_product_thumbnails as tpt ON tp.Id = tpt.ProductId
|
||||
WHERE t.Password IS NULL AND t.IsHibernated IS NULL AND tpt.ImageClass = 'active' AND tp.PrivacyStatus = 'public'
|
||||
ORDER BY RAND()
|
||||
LIMIT 6");
|
||||
} else{
|
||||
} else {
|
||||
$i = DB::select("SELECT t.StoreUrl, tp.ProductName, tp.ProductPrice, tp.ProductURL, tpt.Image FROM teamstores AS t
|
||||
INNER JOIN teamstore_products AS tp ON tp.TeamStoreId = t.Id
|
||||
INNER JOIN teamstore_product_thumbnails as tpt ON tp.Id = tpt.ProductId
|
||||
@@ -267,7 +267,16 @@ class TeamStoreModel extends Model
|
||||
ORDER BY RAND()
|
||||
LIMIT 6");
|
||||
}
|
||||
|
||||
|
||||
return $i;
|
||||
}
|
||||
|
||||
function checkVoucher($userid, $voucherid)
|
||||
{
|
||||
$i = DB::select("SELECT *
|
||||
FROM payment_details AS pd
|
||||
INNER JOIN orders AS o ON pd.CartKey = o.CartKey
|
||||
WHERE pd.UserId = $userid AND o.VoucherId = $voucherid");
|
||||
return $i;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user