Edit your cart

Shopping Cart  
View and edit the contents of your shopping cart



1000) $_SESSION['tabella'] [$new]="professional"; if (($aria_id>1000) && ($aria_id<10000)) $_SESSION['tabella'] [$new]="professional"; elseif ($aria_id>10000) $_SESSION['tabella'] [$new]="video"; else $_SESSION['tabella'] [$new]="karaoke"; //new item selected if(!isset($_SESSION['cart'])) { $_SESSION['cart'] = array(); $_SESSION['items'] = 0; $_SESSION['total_price'] ='0.00'; $_SESSION['tabella'] =array(); } if ($_SESSION['tabella'] [$new]="professional" && isset($_SESSION['cart'][$aria_id-1000])) { $ariakar=$aria_id-1000; $errore="Since the Professional Pack includes the Piano accompaniment track and the CDG file, the Karaoke Pack has been removed from your cart.
"; unset($_SESSION['cart'][$aria_id-1000]); $query="DELETE FROM itemscheck WHERE idcheckout='$idcheckout' AND isbn='$ariakar'"; mysql_query($query) or die('Query failed: ' . mysql_error()); } if ($_SESSION['tabella'] [$new]="karaoke" && isset($_SESSION['cart'][$aria_id+1000])) { $errore= "You already have the professional version of this aria. The professional pack includes the karaoke version
"; $new=$aria_id+1000; } else { $_SESSION['cart'][$new] = 1; $_SESSION['total_price'] = calculate_price($_SESSION['cart']); $_SESSION['items'] = calculate_items($_SESSION['cart']); $prezzo=$_SESSION['total_price']; $rows=0; //istruzioni per aggiornare l'idcheckout $query="SELECT * FROM checkout WHERE idcheckout='$idcheckout'"; $result=mysql_query($query) or die('Query failed: ' . mysql_error()); $rows=mysql_num_rows($result); if ($rows>0) //se � gi� stato immesso l'idcheckout bisogna aggiungere all'itemscheck la nuova voce e aggiornare il total price del checkout { //aria gi� immessa? $query="SELECT isbn FROM itemscheck WHERE idcheckout='$idcheckout'"; $result=mysql_query($query) or die('Query failed: ' . mysql_error()); $presente=""; while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { if ($row['isbn']==$new) { $presente=1; } } if (!$presente) { $query="INSERT into itemscheck (idcheckout,isbn) values (\"$idcheckout\",\"$new\")"; $result=mysql_query($query) or die('Query failed: ' . mysql_error()); $query="UPDATE checkout SET amount='$prezzo' WHERE idcheckout='$idcheckout'"; $result=mysql_query($query) or die('Query failed: ' . mysql_error()); } } else // � la prima aria immessa { if (isset($_SESSION['membro'])) { $membro=$_SESSION['membro']; $query="INSERT into checkout (membro,amount) values (\"$membro\",\"$prezzo\")";//fare query inserendo anche il membro mysql_query($query) or die('Query failed: ' . mysql_error()); $insertid=mysql_insert_id(); $_SESSION['idcheckout']=$insertid; $query="INSERT into itemscheck (idcheckout,isbn) values (\"$insertid\",\"$new\")"; mysql_query($query) or die('Query failed: ' . mysql_error()); } else { $query="INSERT into checkout (amount) values (\"$prezzo\")"; mysql_query($query) or die('Query failed: ' . mysql_error()); $insertid=mysql_insert_id(); $_SESSION['idcheckout']=$insertid; $query="INSERT into itemscheck (idcheckout,isbn) values (\"$insertid\",\"$new\")"; mysql_query($query) or die('Query failed: ' . mysql_error()); } } } } if(isset($_GET['remove'])) { unset($_SESSION['cart'][$_GET['remove']]); $_SESSION['total_price'] = calculate_price($_SESSION['cart']); $_SESSION['items'] = calculate_items($_SESSION['cart']); // rimuovere l'aria dal checkout e dai itemscheckout $prezzo=$_SESSION['total_price']; $idcheckout= $_SESSION['idcheckout']; $remove=$_GET['remove']; $remove=(integer)$remove; $query="UPDATE checkout SET amount='$prezzo' WHERE idcheckout='$idcheckout'"; mysql_query($query) or die('Query failed: ' . mysql_error()); $query="DELETE FROM itemscheck WHERE idcheckout='$idcheckout' AND isbn='$remove'"; mysql_query($query) or die('Query failed: ' . mysql_error()); } if($_SESSION['cart']&&array_count_values($_SESSION['cart'])) { display_cart($_SESSION['cart'], $errore,$new); if (!$new) { echo "

Continue Shopping Secure transaction   Checkout now

\n"; } } else { echo "
Your shopping cart is empty. To add items to your shopping cart, just click the \"add to shopping cart\" or \"add to cart\" links in the previous page or in the Catalog Pages.
\n"; echo "

\n"; echo "

Return to the Home Page

\n"; echo "







\n"; } $target = 'catalog.html'; // if we have just added an item to the cart, continue shopping in that category if($new) { $tabella = get_aria_tabella($new); $details = get_book_details($new,$tabella); if($details['link']) $target = $details['link']; $target="history.go(-1)"; echo "

Continue Shopping Secure transaction   Checkout now

\n"; } echo "

All prices shown are in U.S. (USD) Dollars.

\n"; ?>