Designing for Business in PHP E-commerce site

Building an e-commerce site requires a significant investment. If you design the site in phases, you can reduce the initial investment and therefore cut your losses if the idea proves unsuccessful.

Building an e-commerce site requires a significant investment. If you design the site in phases, you can reduce the initial investment and therefore cut your losses if the idea proves unsuc- cessful. You can use the results from an early phase to assess whether it’s worthwhile to add extra features, and even use revenue from the site to fund future development. If nothing else, planning to build the site in phases means that you can get your site online and receiving orders much earlier than if you build every possible feature into the first release.
Even after you’ve completed your initial planned phases, things might not end there. Whenever planning a large software project, it’s important to design in a way that makes unplanned future growth easy. In Chapter 2, where we’ll start dealing with the technical details of building e-commerce sites, you’ll learn how to design the web site architecture to allow for long-term development flexibility.
If you’re building sites for clients, they will like to think their options are open. Planning the site, or any other software, in phases will help your clients feel comfortable doing business with you. They will be able to see that you are getting the job done and can decide to end the project at the end of any phase if they feel—for whatever reason—that they don’t want to continue to invest in development.

Phase I: Getting a Site Up
Chapters 2 through 7 concentrate on establishing the basic framework for the site and putting a product catalog online. We’ll start by putting together the basic site architecture and decid- ing how the different parts of the application will work together. We’ll then build the product catalog into this architecture. You’ll learn how to
•    Design a database for storing the product catalog, containing departments, categories, and products
•    Write the SQL (Structured Query Language) and PHP (Hypertext Preprocessor) code for accessing that data and making the product catalog functional
•    Provide a product search engine
•    Receive payments through PayPal Website Payments Standard
•    Give the site’s administrators a private section of the site where they can administer the catalog online
After you’ve built this catalog, you’ll see how to offer the products for sale by integrating it with PayPal’s shopping cart and order-processing system, which will handle credit card trans- actions for you and email you with details of orders. These orders will be processed manually, but in the early stages of an e-commerce site, the time you lose processing orders will be less than the time it would have taken to develop an automated system.

Phase II: Creating Your Own Shopping Cart
Using PayPal’s shopping cart is okay and really easy, but it does mean you miss out on a lot of advantages. For example, you can't control the look and feel of PayPal’s shopping cart, whereas if you use your own, you can make it an integral part of the site.
This is a significant advantage, but it’s superficial compared to some of the others. For example, with your own shopping cart, you can store complete orders in the database as part of the order process and then use that data to learn about the customers. With additional work, you also can use the shopping basket and checkout as a platform for selling more prod- ucts. How often have you been tempted by impulse purchases near the checkout of your local store? Well, impulse shopping also works with e-commerce. Having your own shopping cart and checkout gives you the option of offering low-cost special offers from the shopping cart at checkout. You can even analyze the contents of the cart and make suggestions based on this.
Chapters 8 through 10 show you how to
•    Build your own shopping cart
•    Pass a complete order through to PayPal for credit card processing
•    Create an orders administration page
•    Implement a product recommendations system
Once again, at the end of Phase II, our site will be fully operational. If you want, you can leave it as it is or add features within the existing PayPal-based payment system. But when the site gets serious, you’ll want to start processing orders and credit cards yourself. This is the part where things get complicated, and you need to be serious and careful about your site’s security.

Phase III: Processing Orders and Adding Features
The core of e-commerce—and the bit that really separates it from other web-development projects—is handling orders and credit cards. PayPal has helped us put this off, but there are many good reasons why—eventually—you’ll want to part company with PayPal:
Cost: PayPal is not expensive, but the extra services it offers must be paid for somehow. Moving to a simpler credit card processing service can mean lower transaction costs (this is not a rule though), although developing your own system will obviously incur upfront costs.
Freedom: PayPal has a fairly strict set of terms and conditions and is designed for resi- dents of a limited number of countries. By taking on more of the credit card processing responsibility yourself, you can better control the way your site works. As an obvious example, you can accept payment using regional methods such as the Switch debit cards common in the United Kingdom.
Integration: If you deal with transactions and orders using your own system, you can integrate your store and your warehouse to whatever extent you require. You could even automatically contact a third-party supplier and have the supplier ship the goods straight to the customer.
Information: When you handle the whole order yourself, you can record and collate all the information involved in the transaction—and then use it for marketing and research purposes.
By integrating the order processing with the warehouse, fulfillment center, or suppliers, you can reduce costs significantly. This might reduce the need for staff in the fulfillment center or allow the business to grow without requiring additional staff.
Acquiring information about customers can feed back into the whole process, giving you valuable information about how to sell more. At its simplest, you could email customers with special offers or just keep in touch with a newsletter. You also could analyze buying patterns and use that data to formulate targeted marketing campaigns.
During Phase III, you will learn how to
•    Build a customer accounts module so that customers can log in and retrieve their details every time they make an order
•    Allow customers to add product reviews
•    Integrate products into your web site using XML Web Services
•    Establish secure connections using SSL (Secure Socket Layer) so that data sent by users is encrypted on its travels across the Internet
•    Charge credit cards using DataCash and
•    Store credit card numbers securely in a database
This third phase is the most involved of all of them and requires some hard and careful work. By the end of Phase III, however, you will have an e-commerce site with a searchable product catalog, shopping cart, secure checkout, and complete order-processing system.
As we said earlier, we’re going to build an online shop called HatShop (which will sell, surpris- ingly enough, hats). Figure 1-1 shows how HatShop will look at some point during the second stage of development.

For the purposes of this book, we’ll assume that the client already exists as a mail-order company and has a good network of customers. The company is not completely new to the business, and wants the site to make it easier and more enjoyable for its existing customers to buy—with the goal that they’ll end up buying more.
Knowing this, I suggest the phased development because
•    The company is unlikely to get massive orders initially—we should keep the initial cost of building the web site down as much as possible.
•    The company is accustomed to manually processing mail orders, so manually process- ing orders emailed by PayPal will not introduce many new problems.

WooCommerce React Native App

•    The company doesn’t want to invest all of its money in a massive e-commerce site, only to find that people actually prefer mail order after all! Or it might find that after Phase I, the site does exactly what it wants, and there’s no point in expanding it further. Either way, I hope that offering a lower initial cost gives my bid the edge. (It might also mean I can get away with a higher total price.)
Because this company is already a mail-order business, it probably already has a mer- chant account and can process credit cards. Therefore, moving on to Phase III as soon
as possible would be best for this company so it can benefit from the preferential card- processing rates.

In this chapter, we’ve seen some of the principles of e-commerce in the real, hostile world where it’s important to focus on short-term revenue and keeping risks down. We’ve looked at the three basic reasons an e-commerce site can make money:
•    Acquiring more customers
•    Making customers spend more
•    Reducing the costs of fulfilling orders
We’ve applied those principles to a three-phase plan that provides a deliverable, usable site at each stage and continues to expand throughout the book.
At this point, you’ve presented your plan to the owners of the hat shop. In the next chap- ter, you’ll put on your programming hat and start to design and build the web site (assuming you get the contract, of course).

Write a Comment