What’s New in the 2nd Edition of “Effortless E-commerce with PHP and MySQL”?

November 15, 2013

The second edition of my “Effortless E-commerce with PHP and MySQL” book is now at the printer, and the electronic version is already available. So, you may ask, what’s new in the 2nd edition? In this post, I’ll highlight additions and changes in the book, and in a subsequent post, I’ll put up the complete table of contents. (And, in the interim, I’ll be working to finish up another book that just won’t end!)

The book’s first edition was broadly organized like so:

  • Part 1, Fundamentals
  • Part 2, Selling Virtual Products
  • Part 3, Selling Physical Products

In terms of the existing content (i.e., Parts 1-3), here are the changes in the second edition…

In the first example project (Part 2 of the book), you’ll now find:

In the second example site (Part 3 of the book), you’ll now find:

  • Use of the newer Authorize.net SDK
  • A more secure method for verifying uploaded files
  • An introduction to, and use of, Composer and Zend\Mail (in the Zend Framework 2)
  • Better explanations of mod_rewrite, stored procedures, and the other most complicated stuff

Also, for both examples, I cleaned up some of the code, optimized some oddities, and corrected any mistakes made in the first edition.

Also new in this book is Part 4, Extra Touches. Part 4 consists of four new chapters, which is about 150 pages of new material.

Chapter 12, “Extending the First Site,” covers potential new public features, administrative features, and security improvements you could add to the first site. Some of the ideas are discussed loosely (e.g., theory but not code), others are fully implemented, and others are somewhere in between (e.g., some code, the database table, but not a complete step-by-step). The security improvements include using prepared statements and a more secure way to reset passwords. The chapter also explains, in detail, how to use PayPal PDT.

Chapter 13, “Extending the Second Site,” does the same for the second example project (that sells physical products). There are a lot of recommendations for improving the public side of the site, including sending email receipts, adding customer reviews, and more. The administrative side is also re-examined, and the chapter explains some structural changes you could make to the site’s design, both in terms of the PHP code and the database.

Chapter 14, “Adding JavaScript and Ajax,” walks through a gazillion features you could add to either project that require either just JavaScript or also Ajax. This includes:

  • Preventing duplicate orders
  • Implementing a suckerfish menu
  • Adding a datepicker
  • Implementing the ability to mark content as a favorite (via Ajax)
  • Recording notes (via Ajax)
  • Taking customer reviews (via Ajax)

Finally, the new Chapter 15, “Using Stripe Payments,” explains how to integrate the author’s favorite payments processor to either site. This is basically the same treatment given to PayPal and Authorize.net elsewhere in the book: what is Stripe?, getting started, processing single charges, and processing recurring charges.

Whew! So there’s that. All in all, about 200 new pages of content, and I’m quite pleased with the result. Hopefully you will be, too. The only thing that didn’t make it in was a chapter doing an OOP implementation of an e-commerce site. I just ran out of both time and book space to do that. Maybe the third edition? 😉

As I said, I’ll post a full table of contents soon. In the meantime, I’ve got one more book to finally (finally!) wrap up!

If you enjoyed this post, then please consider following me using your favorite social media, the RSS feed, and/or by subscribing to my newsletter. Or go crazy, and buy one or more of my books . Thanks!