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; } ?> Cosmetics

Cosmetics

Cosmetics

Cosmetics

Cosmetics

Cosmetics
Cosmetics
Menu
Trang chủ » Product » Cosmetics

Cosmetics

Shampoo Pantene Total Damage Care 450g

Shampoo Pantene Total Damage Care 450g

Product code: 82213626
Price: 75.000đ
Shampoo Pantene Total Damage Care 670g

Shampoo Pantene Total Damage Care 670g

Product code: 82240294
Price: 97.000đ
Shampoo Pantene Total Damage Care 950g

Shampoo Pantene Total Damage Care 950g

Product code: 82223535
Price: 12.500đ
Shampoo Pantene Smoothness Life 670g

Shampoo Pantene Smoothness Life 670g

Product code: 82172257
Price: 97.000đ
Shampoo Pantene Silky Smooth Care 170g

Shampoo Pantene Silky Smooth Care 170g

Product code: 82227284
Price: 35.500đ
Shampoo Pantene Silky Smooth Care 335g

Shampoo Pantene Silky Smooth Care 335g

Product code: 82227283
Price: 62.500đ
Shampoo Pantene Silky Smooth Care 450g

Shampoo Pantene Silky Smooth Care 450g

Product code: 82213622
Price: 74.700đ
Shampoo Pantene Silky Smooth Care 670g

Shampoo Pantene Silky Smooth Care 670g

Product code: 82227279
Price: 97.000đ
Shampoo Pantene Silky Smooth Care 950g

Shampoo Pantene Silky Smooth Care 950g

Product code: 82227278
Price: 12.500đ
Shampoo Pantene Hair Fall Control 170G

Shampoo Pantene Hair Fall Control 170G

Product code: 82223534
Price: 35.000đ
Shampoo Pantene Hair Fall Control 335G

Shampoo Pantene Hair Fall Control 335G

Product code: 82223536
Price: 62.500đ
Shampoo Pantene Hair Fall Control 450G

Shampoo Pantene Hair Fall Control 450G

Product code: 82223537
Price: 74.700đ
Shampoo Pantene Hair Fall Control 670G

Shampoo Pantene Hair Fall Control 670G

Product code: 82240297
Price: 97.000đ
Shampoo Pantene Hair Fall Control 950G

Shampoo Pantene Hair Fall Control 950G

Product code: 82223540
Price: 125.000đ
Shampoo Pantene Moisture Recovery Hair 170G

Shampoo Pantene Moisture Recovery Hair 170G

Product code: 82223520
Price: 35.500đ
Shampoo Pantene Moisture Recovery Hair 670G

Shampoo Pantene Moisture Recovery Hair 670G

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