//start the session session_start(); //if the user has chosen to keep on shopping //save the shopping cart //then redirect to another page of the site if($_POST['continue'] == '<< Continue Shopping'){ $_SESSION['curr'] = $_POST['currency']; $_SESSION['cds'] = $_POST['cd_quantity']; $_SESSION['books'] = $_POST['book_quantity']; $_SESSION['packs'] = $_POST['pack_quantity']; header("Location: products.html"); } else if($_POST['continue'] == 'Checkout >>'){ $_SESSION['curr'] = $_POST['currency']; $_SESSION['cds'] = $_POST['cd_quantity']; $_SESSION['books'] = $_POST['book_quantity']; $_SESSION['packs'] = $_POST['pack_quantity']; header("Location: buy2.php"); } require_once("prices.php"); /******************************* SHOPPING SYSTEM ***************************** * * When a user adds an item to the cart, the item quantity for that type * of product is incremented by one. * When a user clicks on the trash icon next to a product, the quantity for * that type of product is set to 0, and that product is made invisible. A * link is added to allow the user to add that product to the cart again. * *round all javascript currencies to 2 decimal places * * * ******************************* SHOPPING SYSTEM *****************************/ $currency = $_POST['currency']; //if the currency has not been sent from the shopping cart if (empty($currency)) { $currency = $_SESSION['curr']; //if the currency has not been set before if (empty($currency)) { //set the currency to USD $_SESSION['curr'] = 'USD'; } //if the currency HAS been sent from the shopping cart } else { //set the currency of the shopping cart to the currency sent by the shopping cart form $_SESSION['curr'] = strtoupper($currency); } //initiate price variables $cd = 0; $cdship = 0; $book = 0; $bookship = 0; $pack = 0; $packship = 0; $cursymbol = '$'; //if the currency is USD if($_SESSION['curr'] == 'USD'){ //set the prices accordingly $cd = $cdusd; $cdship = $cdusdship; $book = $bookusd; $bookship = $bookusdship; $book5 = $bookusd5; $bookship5 = $bookusdship5; $book10 = $bookusd10; $bookship10 = $bookusdship10; $pack = $packusd; $packship = $packusdship; $cursymbol = '$'; } else if($_SESSION['curr'] == 'GBP'){ //set the prices accordingly $cd = $cdgbp; $cdship = $cdgbpship; $book = $bookgbp; $bookship = $bookgbpship; $book5 = $bookgbp5; $bookship5 = $bookgbpship5; $book10 = $bookgbp10; $bookship10 = $bookgbpship10; $pack = $packgbp; $packship = $packgbpship; $cursymbol = '£'; } else if($_SESSION['curr'] == 'EUR'){ //set the prices accordingly $cd = $cdeur; $cdship = $cdeurship; $book = $bookeur; $bookship = $bookeurship; $book5 = $bookeur5; $bookship5 = $bookeurship5; $book10 = $bookeur10; $bookship10 = $bookeurship10; $pack = $packeur; $packship = $packeurship; $cursymbol = '€'; } //if no cds have previously been added to the shopping cart if (empty($_SESSION['cds'])) { //if we are adding a cd to the cart if($_GET['addprod'] == 'cd') { //add a cd to the shopping cart $_SESSION['cds'] = 1; } else { $_SESSION['cds'] = 0; } //if cds have previously been added to the shopping cart } else { //if we are adding a cd to the cart if($_GET['addprod'] == 'cd') { //add another cd to the previous number of cds $_SESSION['cds']++; } } //if no cds have previously been added to the shopping cart if (empty($_SESSION['books'])) { //if we are adding a cd to the cart if($_GET['addprod'] == 'book') { //add a cd to the shopping cart $_SESSION['books'] = 1; } else { $_SESSION['books'] = 0; } //if cds have previously been added to the shopping cart } else { //if we are adding a cd to the cart if($_GET['addprod'] == 'book') { //add another cd to the previous number of cds $_SESSION['books']++; } } //if no cds have previously been added to the shopping cart if (empty($_SESSION['packs'])) { //if we are adding a cd to the cart if($_GET['addprod'] == 'pack') { //add a cd to the shopping cart $_SESSION['packs'] = 1; } else { $_SESSION['packs'] = 0; } //if cds have previously been added to the shopping cart } else { //if we are adding a cd to the cart if($_GET['addprod'] == 'pack') { //add another cd to the previous number of cds $_SESSION['packs']++; } } ?>
![]() |
![]() |
||||||||||||||||||
|
|
We are currently experiencing technical difficulties with our payments system. As a temporary measure, you can email your order details to us and our staff will be happy to process your order. Alternatively, you can call us on +353 (0)1 6753522 to place your order. If we are unavailable, please leave a message and we will get back to you as soon as possible. We apologise for any inconvenience caused. |
|||||||||||||||||
![]() |
![]() |
|
|||||||||||||||||