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

Ariel Downy Detergent Liquid 2.7L

Ariel Downy Detergent Liquid 2.7L

Product code: NG A-DM2.7
Price: 198.000đ
Ariel Quick Clean Detergent Liquid 3L

Ariel Quick Clean Detergent Liquid 3L

Product code: NG A-SN3
Price: 199.000đ
Ariel Keep Color Detergent Liquid 2.7L

Ariel Keep Color Detergent Liquid 2.7L

Product code: NG A-GM2.7
Price: 198.000đ
Tide Downy Detergent 2.5Kg

Tide Downy Detergent 2.5Kg

Product code: 82239243
Price: 94.600đ
Tide Downy Detergent 3.8Kg

Tide Downy Detergent 3.8Kg

Product code: 82239244
Price: 132.900đ
Tide Downy Detergent 5Kg

Tide Downy Detergent 5Kg

Product code: 82239245
Price: 174.700đ
Soap Safeguard 135G White

Soap Safeguard 135G White

Product code: SG-T
Price: 9.200đ
Soap Safeguard 135G Green

Soap Safeguard 135G Green

Product code: SG-X
Price: 9.200đ
Soap Safeguard 135G Pink

Soap Safeguard 135G Pink

Product code: SG-H
Price: 9.200đ
Soap Ca May Chic 125G

Soap Ca May Chic 125G

Product code: CM-D
Price: 12.000đ
Soap Ca May Classic 125G

Soap Ca May Classic 125G

Product code: CM-RED
Price: 12.000đ
Soap Camay Natural 125G

Soap Camay Natural 125G

Product code: CM-WHITE
Price: 12.000đ
Tide Downy Detergent 330g

Tide Downy Detergent 330g

Product code: 82227544
Price: 13.900đ
Tide Downy Detergent 650g

Tide Downy Detergent 650g

Product code: 82227545
Price: 26.400đ
Tide BreakThrough Powder Detergent  2.7Kg

Tide BreakThrough Powder Detergent 2.7Kg

Product code: 82236611
Price: 94.600đ
Tide BreakThrough  Detergent 4.1Kg

Tide BreakThrough Detergent 4.1Kg

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