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; } ?> Home care

Home care

Home care

Home care

Home care

Home care
Home care
Menu
Trang chủ » Product » Home care

Home care

Ariel Quick Clean Detergent Liquid Refill 1.6L

Ariel Quick Clean Detergent Liquid Refill 1.6L

Product code: 82228769
Price: 98.500đ
Ariel Quick Clean Detergent Liquid Refill 900ML

Ariel Quick Clean Detergent Liquid Refill 900ML

Product code: 82224038
Price: 60.000đ
Ariel Downy Detergent Liquid 1.35L

Ariel Downy Detergent Liquid 1.35L

Product code: 82228773
Price: 108.000đ
Ariel Keep Color Detergent Liquid 1.8L

Ariel Keep Color Detergent Liquid 1.8L

Product code: 82228776
Price: 142.500đ
Ariel Quick Clean Detergent Liquid 1.5L

Ariel Quick Clean Detergent Liquid 1.5L

Product code: 82224015
Price: 108.500đ
Downy Antibac 900ml Bottle

Downy Antibac 900ml Bottle

Product code: 82233833
Price: 57.500đ
Downy 1 Banlaw 900ml Bottle

Downy 1 Banlaw 900ml Bottle

Product code: 82233834
Price: 58.500đ
Downy Romance 900ml Bottle

Downy Romance 900ml Bottle

Product code: 82225533
Price: 60.500đ
Downy Passion 900ml Bottle

Downy Passion 900ml Bottle

Product code: 82226425
Price: 60.500đ
Downy Baby 900ml Bottle

Downy Baby 900ml Bottle

Product code: 82239306
Price: 57.500đ
Downy Mystique 900ml Bottle

Downy Mystique 900ml Bottle

Product code: 82226760
Price: 60.500đ
Downy Fusion 900ml Bottle

Downy Fusion 900ml Bottle

Product code: 82225362
Price: 60.500đ
Downy Sunrise Fresh 1L Bottle

Downy Sunrise Fresh 1L Bottle

Product code: 82233680
Price: 52.500đ
Downy Timeless 900ml Bottle

Downy Timeless 900ml Bottle

Product code: 82226379
Price: 60.500đ
Downy Romance 800ml Refill

Downy Romance 800ml Refill

Product code: 82226763
Price: 47.000đ
Downy Passion 800ml Refill

Downy Passion 800ml Refill

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