Search the Community
Showing results for tags 'checkout.php'.
On the Shipping Information page, when a phone number is provided that has an area code greater than "214", after the "continue on to billing" button is clicked, the following error results: "An error occurred in script 'C:\wamp64\www\effortlessECommerce\effortless_ecommerce_2nd\ex2\html\checkout.php' on line 158: Your order could not be processed due to a system error." This is because the add_customer stored procedure's "p" (aka "phone") parameter is stored as an "int", and ints have a maximum value of 2,147,483,647. Therefore, a phone number with an area code larger than 214 will fail.
Hi. I'm having a problem with the code in checkout.php in Chapter 19. For some reason, I get the following errors: Notice: Undefined index: cart in C:\xampp\htdocs\php\PHPandMySQL\ch19\checkout.php on line 26. Warning: Invalid argument supplied for foreach() in C;\xampp\htdocs\php\PHPandMySQL\ch19\checkout.php on line 26. Notice: Undefined index: cart in C;\xampp\htdocs\php\PHPandMySQL\ch19\checkout.php on line 37. I have included the header.html file. This starts the session. So the session variable is set. Here is my code for the foreach function on line 26: foreach($_SE
RE: checkout.php...p 301 step17...just showing a work around that works at this stage of chp 10 could not get this line to return the id...$r = mysqli_query($dbc, 'SELECT @cid'); as a result there is no value to store in list($_SESSION['customer_id']) = mysqli_fetch_array($r);...(even reworked the stored procedure for add_customer..no luck My work around: I set $cid = mt_rand(100000,1000000000); added customer_id column to customer's table.... changed the stored procedure=add_customer...to also include customer_id...and....VALUE.... $cid changed setting session to: $_SESSION[
Hi All. I can't get a redirect back to the "checkout.php" in chapter 19. I am using a personalised paypal button. Firstly; are these lines correct in checkout.php? // customer is logged in and this page has access to the customer's ID: session_id)£id); // this page receives the order total: $subtotal = $_SESSION['cart'][$row['print_id']]['quantity'] * $_SESSION['cart'][$row['print_id']]['price']; Secondly; heres the code from view_cart.php with my paypal button, but the problem is that it's not directing it back to checkout.php (above code may be incorrect?) <!--- this