Esempio n. 1
0
        $cc_info_array = array();
        $cc_info_array = array("number" => $cc_number, "exp_mo" => $cc_exp_mo, "exp_yr" => $cc_exp_yr, "cvv" => $cc_cvv, "name_first" => $cc_name_first, "name_last" => $cc_name_last, "address1" => $cc_address1, "address2" => $cc_address2, "city" => $cc_city, "state" => $cc_state, "pos_code" => $cc_pos_code, "alt_phone" => $cc_alt_phone, "submit_time" => time());
        // push that array into session variables
        $_SESSION["cc_info_array"] = $cc_info_array;
        // redirect to info review page for final decision
        $location = "review_payment.php?payment_type=card";
        redirect($location);
    } else {
        $alert = "Please fix the following field(s) and try again";
    }
    // end else ( if there's any required field that needs to be correct )
}
// end if $_POST["card_checkout"] is set
/////////////////////////////////// END EVALUATE POST VARIABLES //////////////////////////////////
/////////////////////////////////// ORDER SUMMARY CODE BLOCK //////////////////////////////////
$cart_max_item = get_cart_max_item();
$var_count = 1;
$item_count = 0;
$grand_total_array = array();
while ($var_count <= $cart_max_item) {
    if (!empty($_SESSION["item_{$var_count}"])) {
        $item_count++;
        $item = $_SESSION["item_{$var_count}"];
        // Prepare values to be sent into "query_food_info" function
        $cart_item_id = $item["cart_item_id"];
        if (!isset($item["cart_item_option_1"])) {
            $cart_item_option_1 = "";
        } else {
            $cart_item_option_1 = $item["cart_item_option_1"];
        }
        if (!isset($item["cart_item_option_2"])) {
Esempio n. 2
0
function clear_cart()
{
    $cart_max_item = get_cart_max_item();
    $var_count = 1;
    $item_count = 0;
    while ($var_count <= $cart_max_item) {
        if (!empty($_SESSION["item_{$var_count}"])) {
            unset($_SESSION["item_{$var_count}"]);
        }
        // end if
        $var_count++;
    }
    // end while loop
}