PHP 5 E-commerce Development

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

This is a fast-paced tutorial focusing on creating a framework and using it to build an online store through an ongoing case study. Later chapters include examples to illustrate how easily the framework can be adapted for different situations. The framework and code are enhanced and built upon with each chapter, adding more and more functionality. If you are a web developer, or anyone looking to increase your understanding of e-commerce site development, this book is for you. Primarily aimed at PHP developers, it is suitable for any web developer interested in enhancing their e-commerce knowledge, or developers looking to move towards PHP. Intermediate knowledge of PHP development and object-oriented programming is assumed, and basic knowledge of e-commerce principles will be of benefit too.

Author(s): Michael Peacock
Year: 2010

Language: English
Pages: 357

184719964X......Page 1
Preface......Page 20
An overview of e-commerce......Page 26
Service-based companies......Page 27
Why a framework?......Page 28
A look at e-commerce sites......Page 29
WooThemes......Page 30
Play.com......Page 31
Products......Page 32
Our framework: what is it going to do?......Page 33
Our framework: why is it going to do it?......Page 34
Juniper Theatricals......Page 35
Summary......Page 36
Designing a killer framework......Page 38
Model-View-Controller (MVC)......Page 39
Registry......Page 40
Singleton......Page 41
Structure......Page 42
Building a killer framework......Page 43
Registry......Page 44
Singleton......Page 46
Registry objects......Page 48
An alternative: with a router......Page 73
Processing the incoming URL within our registry object......Page 74
index.php......Page 75
Configuration file......Page 77
An e-commerce registry?......Page 78
Summary......Page 79
What we need......Page 80
Category information......Page 81
Content......Page 82
Versioning......Page 83
Content......Page 84
Content types......Page 86
Content versions......Page 87
Products......Page 88
Model......Page 89
View......Page 92
Controller......Page 93
Model......Page 95
View......Page 99
Controller......Page 100
Categories......Page 102
Model......Page 103
View......Page 106
Controller......Page 108
Routing products and categories......Page 111
Embedding products......Page 112
Summary......Page 113
Giving users choice......Page 114
How will this work?......Page 115
High-level overview......Page 116
Database structure......Page 117
Template switching......Page 119
Templates......Page 122
Giving users control......Page 123
Custom text......Page 124
Maintaining uploads......Page 125
Extending our products table......Page 126
Template switching......Page 127
Stock control......Page 129
Product subtotals......Page 130
Summary......Page 131
Juniper Theatricals......Page 132
Finding products......Page 133
Controlling searches with the products controller......Page 134
Search results......Page 136
Improving searches......Page 137
Filtering products......Page 138
Product attributes......Page 139
Filter options......Page 141
Processing filter requests......Page 144
Displaying filtered products......Page 148
Providing wish lists......Page 149
Creating the structure......Page 150
Wish-list controller......Page 151
Controller changes......Page 154
Purchases......Page 156
Improving the wish list......Page 157
Related products......Page 158
Controlling the related products......Page 160
E-mail recommendations......Page 161
Help! It's out of stock!......Page 162
Out of stock: a new template bit......Page 163
Stock alerts database table......Page 164
More controller changes......Page 165
Product ratings......Page 167
Saving a rating......Page 168
Viewing ratings......Page 170
Product reviews......Page 171
Processing reviews/comments......Page 172
Displaying reviews/comments......Page 173
Any other experience improvements to consider?......Page 174
Summary......Page 175
Shopping baskets......Page 176
Per-page basket......Page 177
Considerations for our shopping basket......Page 178
Basket database......Page 179
Basket contents......Page 180
checkBasket method......Page 181
The controller......Page 183
An addProduct method......Page 184
The controller......Page 187
Adding customizable products......Page 189
Changing the model......Page 190
Adding product variants......Page 191
Model changes......Page 192
Editing quantities......Page 193
Performing the transfer......Page 196
Displaying the basket on every page......Page 197
Functionality......Page 198
Summary......Page 199
Some examples......Page 200
Amazon......Page 201
Limitations......Page 202
Useful features......Page 203
eBay......Page 204
Interesting points of note......Page 205
Play.com......Page 206
Interesting points of note......Page 207
Voucher codes......Page 208
Authentication......Page 209
Delivery address......Page 210
Off-site payment method......Page 211
Payment details......Page 212
Other points of note......Page 213
Summary......Page 214
Shipping methods......Page 216
Shipping costs......Page 218
Weight-based shipping costs......Page 219
To think about: location-based shipping costs......Page 220
Shipping rules......Page 221
Tracking......Page 223
Calculating shipping costs based on products......Page 224
Calculating shipping costs based on product weights......Page 225
Considering shipping rules, and adjusting prices accordingly......Page 226
Tax......Page 228
Separately calculating tax values......Page 229
A look at our basket now......Page 230
Summary......Page 231
Discount codes......Page 232
Discount codes data......Page 233
Discount codes functionality......Page 234
Discount codes......Page 238
Referrals......Page 239
Changes......Page 240
Summary......Page 241
Order process review......Page 242
Authentication......Page 244
Delivery address......Page 246
Payment method......Page 247
Storing orders in the database......Page 249
Orders table......Page 250
Order items......Page 251
Summary......Page 252
Our payment system......Page 254
The payment button......Page 256
Processing payment to update the order......Page 258
Storing card details......Page 261
Not storing card details......Page 262
Payment gateway tips......Page 263
Summary......Page 264
Changing details......Page 266
Changing password......Page 267
Changing default delivery address......Page 268
Listing orders......Page 269
Order model......Page 270
Cancelling an order......Page 272
Order model additions......Page 273
Controller code......Page 274
Expansion......Page 275
Summary......Page 276
Administration......Page 278
Dashboard......Page 279
Creating a product......Page 280
Creating a category......Page 284
Orders and customers......Page 285
Updating an order......Page 286
Refunds......Page 287
Shipping......Page 288
Creating a voucher code......Page 289
Summary......Page 290
Deploying......Page 292
Hosting accounts and domain names......Page 293
Hosting providers......Page 294
Setting up the database......Page 295
Uploading our store......Page 298
Automated deployment......Page 299
Software......Page 300
Passwords......Page 301
Maintenance......Page 302
Using cPanel......Page 303
Using the command line (SSH)......Page 305
Summary......Page 306
Marketing, SEO, and Customer Retention......Page 308
Buying advertising space......Page 309
Pay-per-click advertisements......Page 310
Advertisement networks provided by search engines......Page 311
Newsletter advertising......Page 312
A word of warning: search engine penalization......Page 313
Marketing materials......Page 314
Twitter......Page 315
Headings......Page 316
Meta tags......Page 317
Sitemap and webmaster tools......Page 318
Customer retention......Page 319
Coupons and voucher codes......Page 320
Summary......Page 321
Google products......Page 322
Creating the feed......Page 323
Product feed controller......Page 324
Google Analytics......Page 325
Add transaction......Page 326
Track transaction......Page 327
eBay.com......Page 328
Summary......Page 329
Extending products......Page 330
Access database......Page 331
Providing access......Page 332
Rescinding access......Page 333
What else is needed?......Page 334
Summary......Page 335
Help! I forgot my password!......Page 336
Reset the password......Page 337
E-mailing customers......Page 338
Integrating reCAPTCHA......Page 339
Tweeting about happy customers......Page 340
Other uses......Page 341
Summary......Page 342
Index......Page 344