Jump to content
Larry Ullman's Book Forums

Search the Community

Showing results for tags 'checkout.php'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Single Editions
    • Modern Javascript: Develop and Design
    • The Yii Book
    • Effortless Flex 4 Development
    • Building a Web Site with Ajax: Visual QuickProject
    • Ruby: Visual QuickStart Guide
    • C++ Programming: Visual QuickStart Guide
    • C Programming: Visual QuickStart Guide
    • Adobe AIR: Visual QuickPro Guide
  • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (5th Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)
    • PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide (3rd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (2nd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (1st Edition)
  • PHP for the Web: Visual QuickStart Guide
    • PHP for the Web: Visual QuickStart Guide (5th Edition)
    • PHP for the Web: Visual QuickStart Guide (4th Edition)
    • PHP for the Web: Visual QuickStart Guide (3rd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (2nd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (1st Edition)
  • Effortless E-commerce with PHP and MySQL
    • Effortless E-Commerce with PHP and MySQL (2nd Edition)
    • Effortless E-Commerce with PHP and MySQL
  • PHP Advanced: Visual QuickPro Guide
    • PHP Advanced and Object-Oriented Programming: Visual QuickPro Guide (3rd Edition)
    • PHP 5 Advanced: Visual QuickPro Guide (2nd Edition)
    • PHP Advanced: Visual QuickPro Guide
  • MySQL: Visual QuickStart Guide
    • MySQL: Visual QuickStart Guide (2nd Edition)
    • MySQL: Visual QuickStart Guide (1st Edition)
  • Other
    • Announcements
    • Newsletter, Blog, and Other Topics
    • Forum Issues
    • Social

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 4 results

  1. 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. I fixed the error like this: 1) Go to PHPMyAdmin. 2) Click "Procedures" 3) Click the "edit" button next to "add_customer" 4) Scroll down to the second to last row and change parameter "p" from an "int" to a "char". 5) Change parameter "p"'s "length/values" field from blank to "10" (no quote marks). 6) Click "Go" button. Now it "works on my machine".
  2. 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($_SESSION['cart'] as $pid => $item) { ... } Here is the if conditional for line 37: if($affected == count($_SESSION['cart'])) { ... } Why am I getting these notices and warnings? The code appears correct.
  3. 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['customer_id'] = $cid; this seems to be working at this stage of chp 10...
  4. 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 is where the user comes back to after they finished making the payment ---> <input type="hidden" name="notify_url" Value="http://wolfcut.co.uk/checkout.php" /> <!-- Specify details about the item that buyers will purchase. --> '.$string_of_item_names.' '.$string_of_item_amounts.' <input type="hidden" name="currency_code" value="GBP"> <!-- Display the payment button. --> <div align="center"> <input type="image" name="submit" border="0" align="center" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" alt="PayPal - The safer, easier way to pay online"> <img alt="" border="0" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" > </div> Any advice is appreciated. Thanking you!
×
×
  • Create New...