ลบรายการสินค้าที่ชอบ เรียบร้อยแล้ว !!



"; unset($_SESSION["wishlist"][$new_s]); $_SESSION['num_wishlist'] = $_SESSION['num_wishlist'] - 1; show_bestseller_products(); themefoot(); exit; } if($act=="clear") { themehead("Wish List"); echo "

ลบรายการสินค้าที่ชอบทั้งหมด เรียบร้อยแล้ว !!



"; $_SESSION["wishlist"] = Array(); $_SESSION['num_wishlist'] = 0; show_discount_products(); themefoot(); exit; } $nofollow=1; themehead("Wish List"); if($new_s) { if(!isset($_SESSION["wishlist"])) $_SESSION["wishlist"] = Array(); if($_SESSION["wishlist"][$new_s]) { if($qtys) $_SESSION["wishlist"][$new_s]+=$qtys; else $_SESSION["wishlist"][$new_s]++; }else{ if($qtys) $_SESSION["wishlist"][$new_s]=$qtys; else $_SESSION["wishlist"][$new_s]=1; } }elseif($act){ if(count($_SESSION["wishlist"])>0) { $superGlobal = '_GET'; global $$superGlobal; $newSuperGlobal = $$superGlobal; foreach($_SESSION["wishlist"] as $isbn=>$qty) { if($newSuperGlobal[$isbn]=="0") unset($_SESSION["wishlist"][$isbn]); else $_SESSION["wishlist"][$isbn] = $newSuperGlobal[$isbn]; } } } $_SESSION['num_wishlist'] = count($_SESSION["wishlist"]); if(count($_SESSION["wishlist"])<1) { echo "

ยังไม่มีสินค้าในรายการที่ชอบ !!



"; show_reccommend_products(); themefoot(); mysql_close($connection); exit; } $info = ""; $i=0; $info .= "
"; $info .= "

 ดูรายละเอียด    ลบออก    มีสินค้านี้ในตะกร้าแล้ว    หยิบใส่ตะกร้า    เปรียบเทียบสินค้า  

"; $info .= ""; foreach ($_SESSION["wishlist"] as $isbn => $qty) { $maxview = $_SESSION["wishlist"][$isbn]; $mvtitle = ($maxview > 2) ? "".$maxview." " : $maxview; if($i%3==0) $info .=""; $product = get_product_details_1($isbn); $pid = $product['mainid']; if($pid=="") { $product = get_product_details_2($isbn); $pid = $product['mainid']; } $image = get_catalog_image($pid); $imarray = explode("@",$image['picture']); $img = $imarray[0]; $info .= ""; $i++; } $info .= "

".stripslashes($image["title"])."

จำนวนครั้งที่ชอบ ".$mvtitle."

  "; /************* เช็คว่ามีสินค้านี้ในตะกร้าแล้วหรือยัง ***************/ $productdetail = get_product_details_1($isbn); $chkid = $productdetail['id']; $itemprice = $productdetail['price']; $chkincart = $_SESSION["cart"][$chkid]; $sumprice = $itemprice * $chkincart; $info .= " "; if($chkincart != "") { $info .= "    

"; } else { $info .= "     

"; } $info .= "
"; echo "





"; echo "

"; echo $info; echo "
"; echo "
ลบรายการสินค้าที่ชอบทั้งหมด
"; themefoot(); mysql_close($connection); exit; ?>