0)
{
while($Fetitem = mysql_fetch_array($objitem))
{
$menuid=$Fetitem['id'];
$menuid_d_s=$Fetitem['productid'];
$si=$si+1;
$qty=$Fetitem['qty'];
$objmenu=mysql_query("SELECT * from shop_product where product_id='$menuid_d_s'");
$resmenu=mysql_fetch_array($objmenu);
$menuname=$resmenu['name'];
$productprice=$resmenu['price'];
$productprice_int=$resmenu['points'];
$totprice=($qty*$resmenu['price']);
$totprice_int=($qty*$resmenu['points']);
$new_price +=$totprice;
$country;
$vstatus=$resmenu['vstatus'];
$weight=$resmenu['stock_status_id'];
$vid_type = $resmenu['v_s'];
if($vid_type !=1){
if($weight=='' || $weight==0)
{
$weight=100;
}
}
else{
$weight = 0;
}
if($new_status==1)
{
if($vstatus==1)
{
$v_qty=($qty/2);
}
if($vstatus==6)
{
$v_qty=($qty/2);
}
if($vstatus==7)
{
$v_qty=($qty/2);
}
if($vstatus==2)
{
$v_qty=($qty/4);
}
$x = (int)$v_qty;
}
else
{
$x=0;
}
$x;
$new_qty=($weight*($qty+$x));
$new_kilo=($new_qty/1000);
$new_kilo_1 = explode('.',$new_kilo);
$new_kilo_2=$new_kilo_1[0]; // Before the Decimal point
$new_kilo_3 +=$new_kilo_2;
$totprice1 +=$totprice;
$tot_weight_2 +=$new_qty;
}
}
return $tot_weight_2;
}
?>