query($sql); $row = $d->fetch_array(); return $row; } function remove_product($pid,$size,$mau){ $pid=intval($pid); $max=count($_SESSION['cart']); for($i=0;$i<$max;$i++){ if($pid==$_SESSION['cart'][$i]['productid'] && $size==$_SESSION['cart'][$i]['size'] && $mau==$_SESSION['cart'][$i]['mau']){ unset($_SESSION['cart'][$i]); break; } } $_SESSION['cart']=array_values($_SESSION['cart']); if(count($_SESSION['cart'])==0) { $redirect=true; } else { $redirect=false; } } function get_order_total(){ global $d; $max=count($_SESSION['cart']); $sum=0; for($i=0;$i<$max;$i++){ $pid=$_SESSION['cart'][$i]['productid']; $q=$_SESSION['cart'][$i]['qty']; $price=get_product($pid); $sum+=$price['gia']*$q; } return $sum; } function get_total(){ $max=count($_SESSION['cart']); $sum=0; for($i=0;$i<$max;$i++){ $q=$_SESSION['cart'][$i]['qty']; $sum+=$q; } return $sum; } function addtocart($pid,$q,$size,$mau){ if($pid<1 or $q<1) return; if(is_array($_SESSION['cart'])){ $ck=product_exists($pid,$size,$mau); if($ck==-1) { ## Sản phẩm chưa có => thêm vào giỏ hàng $max=count($_SESSION['cart']); $_SESSION['cart'][$max]['productid']=$pid; $_SESSION['cart'][$max]['qty']=$q; $_SESSION['cart'][$max]['size']=$size; $_SESSION['cart'][$max]['mau']=$mau; } else { ## Sản phẩm đã có => cộng dồn số lượng $_SESSION['cart'][$ck]['qty']=$q+$_SESSION['cart'][$ck]['qty']; } } else{ $_SESSION['cart']=array(); $_SESSION['cart'][0]['productid']=$pid; $_SESSION['cart'][0]['qty']=$q; $_SESSION['cart'][0]['size']=$size; $_SESSION['cart'][0]['mau']=$mau; } } function product_exists($pid,$size,$mau){ $pid=intval($pid); $max=count($_SESSION['cart']); $flag=-1; for($i=0;$i<$max;$i++){ if($pid==$_SESSION['cart'][$i]['productid'] && $size==$_SESSION['cart'][$i]['size'] && $mau==$_SESSION['cart'][$i]['mau']){ $flag=$i; break; } } return $flag; } ?> Product - LOGI VIETNAM

Product - LOGI VIETNAM

Product - LOGI VIETNAM

Product - LOGI VIETNAM

Product - LOGI VIETNAM

Product - LOGI VIETNAM
Product - LOGI VIETNAM
Menu

Product

Tide Powder Deterhent 6kg

Tide Powder Deterhent 6kg

Product code: 82235524
Price: 182.000đ
Tide BreakThrough  Detergent 360g

Tide BreakThrough Detergent 360g

Product code: 82227543
Price: 13.900đ
Tide BreakThrough  Detergent 720g

Tide BreakThrough Detergent 720g

Product code: 82227548
Price: 26.400đ
Tide BreakThrough Detergent  5.5Kg

Tide BreakThrough Detergent 5.5Kg

Product code: 82239251
Price: 174.700đ
Shampoo H&S Mint 625ml

Shampoo H&S Mint 625ml

Product code: H&S BH625
Price: 122.000đ
Shampoo H&S Lemon 625ml

Shampoo H&S Lemon 625ml

Product code: H&S C625
Price: 122.000đ
Shampoo H&S For Scalp Itch 625ml

Shampoo H&S For Scalp Itch 625ml

Product code: H&S DDN625
Price: 122.000đ
Shampoo H&S Anti Hair Fall 625ml

Shampoo H&S Anti Hair Fall 625ml

Product code: H&S NRT625
Price: 122.000đ
Shampoo H&S Smooth Silky 625ml

Shampoo H&S Smooth Silky 625ml

Product code: H&S SMOM625
Price: 122.000đ
Shampoo H&S Apple 625ML

Shampoo H&S Apple 625ML

Product code: H&S T625
Price: 122.000đ
Conditioner H&S Mint 170Ml

Conditioner H&S Mint 170Ml

Product code: H&S-X BH170
Price: 50.000đ
Conditioner H&S Anti Hair Fall 170Ml

Conditioner H&S Anti Hair Fall 170Ml

Product code: H&S-X NRT170
Price: 50.000đ
Shampoo H&S Mint 173ml

Shampoo H&S Mint 173ml

Product code: H&S BH173
Price: 44.100đ
Shampoo H&S Mint 350ml

Shampoo H&S Mint 350ml

Product code: H&S BH350
Price: 77.500đ
Shampoo H&S Mint 950ml

Shampoo H&S Mint 950ml

Product code: H&S BH900
Price: 175.000đ
Shampoo H&S For Scalp Itch 173ml

Shampoo H&S For Scalp Itch 173ml

Product code: H&S DDN173
Price: 44.100đ
Close
Sản phẩm
Đơn giá
Số lượng
Thành tiền
Thành tiền: