dev #1
@@ -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) {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user