dev #1

Merged
webmaster merged 19 commits from dev into main 2025-12-22 15:28:43 +00:00
2 changed files with 11 additions and 1 deletions
Showing only changes of commit f26c9c274b - Show all commits

View File

@@ -399,7 +399,7 @@ class PaypalController extends Controller
public function getTax($cartKey)
{
$m = new TeamStoreModel;
$updated_getSubtotal = $m->getSubtotal($cartKey);
$updated_getSubtotal = $m->getSubtotalNew($cartKey);
$grouped_item = $m->selectTeamStoreGroupByCartKey($cartKey);
if (count($grouped_item) <= 0) {

View File

@@ -189,6 +189,16 @@ class TeamStoreModel extends Model
return $i;
}
function getSubtotalNew($cartKey)
{
$i = DB::table('cart_tmp')->select(DB::raw('SUM(Quantity * Price) AS Subtotal'))
->where('CartKey', '=', $cartKey)
// ->where('VoucherId', '=', null)
->get();
return $i;
}
function updateStoreItem($data, $url)
{
$i = DB::table('teamstore_products')->where('ProductURL', $url)