Drupal e-commerce with Ubercart 2.x - Papadongonas George - E-Book

Drupal e-commerce with Ubercart 2.x E-Book

Papadongonas George

0,0
23,50 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

In Detail

Ubercart is an exciting open source e-commerce package that fully integrates your online store with Drupal. Ubercart leverages the advantages of Drupal's major core and contributed systems, providing your users with shopping cart functionality that integrates with other parts of your company or community web site. It can be used to sell shippable goods, downloadable products, recurring memberships, and event tickets, and to enable complex interactions with Drupal through various add-on contributions.

This book guides you through the process of creating, administrating and marketing an online store, providing information and tips for raising your sales and your customer support. It will also show you how to maintain and add advanced capabilities to your company's eShop.

If you are a merchant wanting to invest your precious time to update the online presence of your company, or a web site designer wanting to expand your business and offer innovative solutions to your clients, this book has been written for you. You don't need any programming experience to install and customize your electronic store. The procedure is well structured and easy and all we ask you to do is to follow some simple steps in order to complete some specific tasks in each chapter. The book will guide you through the installation and configuration of Drupal and Ubercart. From there it will cover specific areas like managing orders, customizing the frontend and user interface. At the end it covers the advanced topics of internet marketing techniques and Search Engine Optimization.

When you reach the end of the book, you'll have a working store and you'll have obtained all the required knowledge to customize it to your specific needs.

A practical guide to building and customizing a fully functional E-store with Ubercart and Drupal

Approach

This book will take you through the basics, like Drupal and Ubercart installation and common settings, and as we proceed through the chapters, we'll implement more advanced techniques.

Whether you know Drupal or not, this book will be your guide to creating a powerful e-commerce web site.

Who this book is for

If you are a business owner wanting to create an eCommerce website for your company or to upgrade a company eShop to be easier to maintain and have advanced e-shopping capabilities, then this book is meant for you. You don't need any programming experience to use this book.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 352

Veröffentlichungsjahr: 2010

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Drupal e-commerce with Ubercart 2.x
Credits
About the Authors
Acknowledgement
About the Reviewer
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
1. Getting Started
What is Drupal?
What is Ubercart?
Book details
The final store
Summary
2. Installation of Drupal and Ubercart
Minimum requirements for Ubercart installation
Creating a local environment using a web server, PHP, and a database server
Using a commercial hosting service
Downloading and installing Drupal
Downloading and installing all the required Drupal modules
Downloading and installing Ubercart
Required modules
Optional core modules
Extra modules
Using UberDrupal, an Ubercart installation profile
Summary
3. Basic Configuration
Drupal configuration
General view of the administration page
Content management
Site building
Site configuration
Store administration
Cart settings
Catalog settings
Checkout settings
Order settings
Product settings
Store settings
Summary
4. Managing Categories, Products, and Attributes
Creating categories and subcategories
Configuring product categories
Creating user-generated free tagging
Creating and managing products
Creating a product kit
Importing products from text files
Creating product attributes
Product classes
Managing the product catalog
Summary
5. Managing Shipping and Packaging
Deciding where to ship products: Country settings
Understanding and configuring conditional actions
Shipping quote settings—overview
Flat rate
UPS
USPS
Weight quote
Summary
6. Managing Taxes and Payments
Managing tax rates and settings
Basic tax rate configuration
Adding a new tax rate
Payment settings
Understanding payment workflow
Accepting credit cards on site—pros and cons
Pros
Cons
Analyzing payment settings
Payment settings
Payment methods
Payment gateways
Selecting payment methods
Ubercart third-party payment modules
Integrating with payment gateways
Paypal: Create account, customize, connect with Ubercart, manage
PayPal account setup instructions
PayPal account upgrade instructions
Apply for Website Payments Pro
Google Checkout: Create account, customize, connect with Ubercart, manage
Configuring Google Checkout
Create your own payment gateway from scratch
Summary
7. Managing Customers and Orders
Managing Customers
Viewing customers
Viewing orders
Managing and fulfilling orders
Order workflow (payment, e-mails, packaging, and delivery)
Searching orders
Viewing orders
Creating an order from the admin panel
Processing orders
Adding line item amount
Merging orders
Invoicing
Logging payment action
Creating package option
Creating shipping cart
Viewing order auditing trail logs
Ubercart reports
Cart links
Customers
Products
Sales
Customer Relation Management and loyalty programs
Integration with CiviCRM
Ubercart Wish List
Community-building actions
Newsletters
Corporate blogging
Forum for product discussions
Twitter account
Summary
8. Customizing the Frontend
Install a ready-made Drupal theme
Basic principles when choosing a theme
Do it yourself
Total time spend on theme selection
Budget
Places to look
Get it for free
Total time spend on theme selection
Budget
Places to look
Buy it
Total time spend on theme selection
Budget
Places to look
Hire a designer
Total time spend on theme selection
Budget
Places to look
Installing a Drupal theme
Customizing a theme
Changing basic elements
Changing page properties and layout
Theme global settings
Theme-specific configuration
Creating a theme from scratch using the Zen theme
The tools
Firebug
ColorZilla
A code editor
Characteristics and advantages of Zen theme
Installing Zen theme
Creating and customizing a Zen subtheme
Fusion Theming System with Skinr module: A new approach to Drupal theming
Migrating an HTML theme to a Drupal template
Creating a Drupal theme from a Photoshop template
Summary
9. User Interface Enhancement Techniques
Product cross-selling
Using taxonomies
Using recommendation systems
Product layout using Panels
Panels in Drupal
Panels basic configuration
Panels for product layout
Creating custom functionality using Views
Improving the shopping cart
Pictured cart module
Ajax Cart module
Terms of Service module
Sales and price administration
Ubercart Discounts module
Ubercart Discount Coupons module
Ubercart Multiprice module
Ubercart Price Per Role module
Ubercart Custom Price module
Summary
10. Optimizing and Promoting Your Store
Search engine optimization
The Drupal SEO Checklist module
Pathauto module
Page Title module
Global Redirect module
Path redirect module
Meta tags module
Site map module
XML sitemap module
Submit your website to Google
Internet marketing
Service links module
Google Base integration
Google Analytics and goals tracking
Improving performance
Performance settings
Enhancing store security
The Backup and Migrate module
Security Review module
Mollom module
Summary
A. Hotel Bookings System for Ubercart
Creating Hotel Room type
The Hotel Booking block
Summary
B. Modules Used in the Book
Modules used in Chapter 2
Token
URL
Maintainers
Content Construcion Kit (CCK)
URL
Maintainers
Filefield
URL
Maintainers
Imagefield
URL
Maintainers
ImageAPI
URL
Maintainer
ImageCache
URL
Maintainer
Thickbox
URL
Maintainer
Google Analytics
URL
Maintainers
Views
URL
Maintainers
Modules used in Chapter 4
Node import
URL
Maintainers
Community Tags
URL
Maintainers
Tagadelic
URL
Maintainers
Modules used in Chapter 7
CiviCRM
URL
Maintainer
UC Wish List
URL
Maintainer
Simplenews
URL
Maintainers
Tweetbacks
URL
Maintainer
Twitter
URL
Maintainers
Modules used in Chapter 9
Browsing History Recommender
URL
Maintainer
Relevant Content
URL
Maintainer
Ubercart Products Recommender
URL
Maintainer
Panels
URL
Maintainers
Views Slideshow
URL
Maintainers
Ubercart Views
URL
Maintainer
Ubercart Ajax cart
URL
Maintainers
Ubercart Terms Of Service
URL
Maintainer
Ubercart Discounts (Alternative)
URL
Maintainers
Ubercart Discount Coupons
URL
Maintainers
UC Multiprice
URL
Maintainer
Modules used in Chapter 10
SEO Checklist
URL
Maintainers
Pathauto
URL
Maintainers
Page Title
URL
Maintainers
Global Redirect
URL
Maintainers
Path redirect
URL
Maintainers
Meta tags
URL
Maintainers
Site map
URL
Maintainer
XML sitemap
URL
Maintainers
Service links
URL
Maintainer
Ubercart Google Base Integration
URL
Maintainer
Backup and Migrate
URL
Maintainer
Security Review
URL
Maintainer
Mollom
URL
Maintainers
Modules used in Appendix A
Hotel Booking System for Ubercart
URL
Maintainer
Summary
C. Free and Commercial Ubercart Themes
Free themes
Acquia Prosper
Creator
URL
AD Novus
Creator
URL
Acquia Marina
Creator
URL
Commercial themes
Market Share
Creator
URL
Luxe
Creator
URL
New Media
Creator
URL
Summary
Index

Drupal e-commerce with Ubercart 2.x

George Papadongonas

Yiannis Doxaras

Drupal e-commerce with Ubercart 2.x

Copyright © 2010 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: March 2010

Production Reference: 1150310

Published by Packt Publishing Ltd.

32 Lincoln Road

Olton

Birmingham, B27 6PA, UK.

ISBN 978-1-847199-20-1

www.packtpub.com

Cover Image by Filippo (<[email protected]>)

Credits

Authors

George Papadongonas

Yiannis Doxaras

Reviewer

Jose Argudo

Acquisition Editor

Usha Iyer

Development Editor

Chaitanya Apte

Technical Editors

Bhavesh Bhasin

Ishita Dhabalia

Copy Editor

Sanchari Mukherjee

Editorial Team Leader

Gagandeep Singh

Project Team Leader

Priya Mukherji

Project Coordinator

Leena Purkait

Indexers

Hemangini Bari

Rekha Nair

Proofreader

Chris Smith

Production Coordinator

Shantanu Zagade

Cover Work

Shantanu Zagade

About the Authors

George Papadongonas is the owner of Infowonders (http://www.infowonders.gr), a web development firm, located in Athens, Greece. He started his career as a freelance web developer in 2000 and works with small and medium size enterprises. He has experience in many development platforms, but fell in love with Drupal in 2007 and with Ubercart in 2008. He is a member of the Drupal Association and an active supporter of the open source community. His Twitter name is @infowonders.

Yiannis Doxaras is a senior open source developer and committer with more than eight years of experience in Java EE, PHP, Python, XHTML, CSS, and all related web frameworks. He has studied theoretical physics at UOA and NTUA. He has published more than 100 articles and posts about web technologies-related matters. Being a serial entrepreneur, he has worked with all major Greek Telcos, banks, and government services. In addition, he has coordinated research for European Community-funded projects and he is also an active innovation agent active in South Eastern Europe. Currently, he is focused on the areas of location-aware and augmented reality applications. Although he lives in Athens, he is a frequent traveler and in his limited free time enjoys running and technical reading. He is a dedicated user of open source technologies in every aspect of his academic and professional work.

Acknowledgement

This book would not have been written without the help and support of some great people: first of all, the Packt team and especially Usha Iyer, Leena Purkait, and Chaitanya Apte. Your guidance and patience during our first writing adventure was amazing.

We would also like to thank Dries Buytaert, the creator of Drupal and Ryan Szrama, the creator of Ubercart. Your personal projects became so important, that they affect the lives of thousands of people daily.

And of course, the Drupal and Ubercart communities for providing ideas, solving problems, and contributing fantastic modules.

About the Reviewer

Jose Argudo is a web developer from Valencia, Spain. After finishing his studies he started working for a web design company. Then, six years later, he decided to start working as a freelancer.

Now that some years have passed as a freelancer, he thinks it's the best decision he has ever taken, a decision that let him work with the tools he likes, such as Joomla!, Codeigniter, Cakephp, jQuery, and other well-known open source technologies.

His desire to learn and share his knowledge has led him to be a regular reviewer of books from Packt, such as Joomla! 1.5 Multimedia, Joomla! With Flash, Joomla! 1.5 SEO, Magento 1.3 Theme Design, and Symfony 1.3 Web Application Development.

Recently he has even published his own book, CodeIgniter 1.7 (ISBN 978-1-847199-48-5), which you can also find at Packt Publishing's site. If you work with PHP... take a look at it!

If you want to know more about him, you can check his site www.joseargudo.com.

To my brother, I wish him the best.

 

This book is dedicated to my wife Maria. I feel grateful for every day I spend with you.

  --George Papadongonas
 

This book is dedicated to all open source developers out there. Their contributions over the years have provided this book a platform to describe and audience to address.

  --Yiannis Doxaras

Preface

Ubercart is an exciting open source e-commerce package that fully integrates your online store with Drupal. Ubercart leverages the advantages of Drupal's major core and contributed systems, providing your users with shopping cart functionality that integrates with other parts of your company or community website. It can be used to sell shippable goods, downloadable products, recurring memberships, and event tickets, and to enable complex interactions with Drupal through various add-on contributions.

This book guides you through the process of creating, administrating, and marketing an online store, providing information and tips for raising your sales and your customer support. It will also show you how to maintain and add advanced capabilities to your company's e-shop.

If you are a merchant wanting to invest your precious time to update the online presence of your company, or a website designer wanting to expand your business and offer innovative solutions to your clients, this book has been written for you. You don't need any programming experience to install and customize your electronic store. The procedure is well structured and easy and all we ask you to do is to follow some simple steps in order to complete some specific tasks in each chapter. The book will guide you through the installation and configuration of Drupal and Ubercart. From there it will cover specific areas like managing orders, customizing the frontend and customizing the user interface. At the end it covers the advanced topics of Internet marketing techniques and Search Engine Optimization.

When you reach the end of the book, you'll have a working store and you'll have obtained all the required knowledge to customize it to your specific needs.

What this book covers

Chapter 1, Getting Started, provides some basic definitions on Drupal and Ubercart. In addition, it sets the context of the online store case study that will be developed throughout the book.

Chapter 2, Installation of Drupal and Ubercart, is a quick installation reference for Drupal, the required Drupal modules, and Ubercart.

Chapter 3, Basic Configuration, helps you to understand the basic Drupal and Ubercart configuration.

Chapter 4, Managing Categories, Products, and Attributes, will show how to manage categories using the Drupal taxonomy, how to create new products or import them from external files, and how to use the attribute system of Ubercart.

Chapter 5, Managing Shipping and Packaging, helps the user to manage shipping and packaging in a flexible way. In this chapter you'll learn how to configure them.

Chapter 6, Managing Taxes and Payments, helps the user to manage taxes and payments in a flexible way. In this chapter you'll learn how to configure them.

Chapter 7, Managing Customers and Orders, is focused on CRM, reporting, and after-sales support.

Chapter 8, Customizing the Frontend, will show you how to install a new theme, customize a theme, or create a new theme from scratch.

Chapter 9, User Interface Enhancement Techniques, helps you to implement more complex marketing techniques.

Chapter 10, Optimizing and Promoting Your Store, will show you how to make an Ubercart store faster, more secure, and more search engine friendly.

Appendix A, Hotel Bookings System for Ubercart, shows how Ubercart can be used not only for selling products, but also for offering services as well.

Appendix B, Modules Used in the Book, lists the modules you can download when working through the exercises for each of the chapters.

Appendix C, Free and Commercial Ubercart Themes, gives you details of some very interesting free and commercial Ubercart themes.

What you need for this book

Actually, you only need a computer to start working with this book. In Chapter 2 we'll show you how to install PHP, a database, and a web server, if they aren't already installed on your system. We'll also show you how to use a remote server and install you store there.

Who this book is for

If you are a business owner wanting to create an e-commerce website for your company or to upgrade a company e-shop to be easier to maintain and have advanced e-shopping capabilities, then this book is meant for you. You don't need any programming experience to use this book.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "There is a possibility of facing an error message at this stage. It shows up when register_globals is enabled."

A block of code is set as follows:

<?phpphpinfo ();?>

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Go to Home | Administer | Store administration | Configuration | Tax rates and settings."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to <[email protected]>, and mention the book title via the subject of your message.

If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or e-mail <[email protected]>.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book on, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the let us know link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at <[email protected]> with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at <[email protected]> if you are having a problem with any aspect of the book, and we will do our best to address it.

Chapter 1. Getting Started

Building an e-commerce site used to be a very difficult and expensive procedure. A decade ago, if you wanted to build one, you had to hire one or more experienced developers to build an application for you from scratch, after working for several weeks. You had to pay a fair amount of money to build, customize, and support this application. In those days, only big companies could afford this cost.

Nowadays, things are much simpler: e-commerce applications are lighter, faster, and of course cheaper, which gives each merchant the capability to sell his or her products online. If you are a merchant wanting to invest your precious time to update the online presence of your company, or a website designer wanting to expand your business and offer innovated solutions to your clients—this book is written for you. You don't need any programming skills to install and customize an electronic store. The procedure is well structured and easy, and all we ask you to do is to follow some simple steps in order to complete some specific tasks in each chapter.

When you reach the end of this book, you'll have a working store and you'll have obtained all the knowledge required to customize it according to your specific needs.

What is Drupal?

Drupal is an award-winning, free, and open source Content Management System (CMS), winner in two categories of the Packt Publishing 2008 Open Source CMS Awards (http://www.packtpub.com/article/2008-open-source-cms-award-winner-announced). Drupal's source code is freely distributed under the terms of the GNU General Public License 2 (GPL). The GPL, unlike permissive free software licenses like BSD, is an example of a powerful copyleft license that imposes constrains on all the derived software components to be available under the same copyleft. Therefore, GPL grants the rights of the free software definition to the recipients of a computer program, and uses copyleft to ensure that the freedom is preserved, even when the software is changed or added to.

Unlike proprietary blogging or content management systems, Drupal's feature set is fully available to extend or customize as needed.

Drupal was started as a small content-sharing personal platform by Dries Buytaert in the University of Antwerp campus. When Dries left the university, it was published on the Internet to continue communication with the group. Thus, Drupal was hosted on Drop.org at first, until it became very popular with users asking for more and more functionality. Then Dries decided to make it open source software and started maintaining it with other code contributors from the open source community. Gradually, it became state-of-the-art software with a devoted community with hundreds and thousands of members. There are millions of websites built with Drupal, from personal blogs to the White House web page.

The main advantages of Drupal are:

It's open source software.It has an active community, ready to support every new member.It is optimized for performance and is scalable.It is a social media ready with features such as forums, blogs, polls, and managed communities.It provides out-of-the-box advanced auditing, reporting, and statistics system.It provides extensive support for multilingual sites.It is platform and web server independent, and can be deployed on any environment (Windows, Unix, and Mac OS X) in single instances or in a cloud.It is database independent and can easily be linked with any major open source database.Drupal modules can extend its functionality. New third-party modules are created every day by individual developers.Drupal is not oriented only to developers, but to simple users as well.

To learn more about Drupal, browse to http://www.drupal.org.

What is Ubercart?

Ubercart is not a standalone application, but it's a module for Drupal. This means that you first have to install and customize Drupal, and then install Ubercart and all its related third-party modules. Imagine how powerful this combination is. You won't have just a selling point for your products, but a complete platform to interact with your clients and market your company.

Some key aspects of Ubercart that make it the number-one solution for online shops with Drupal are:

Transparent integration with Drupal basic core resulting in advanced reporting, user administration, and community-building featuresFully extensible with community wide support as it implements Drupal's core API programming patternsOut-of-the-box functionality for each key aspect of your online store such as products, checkouts, payments, orders, and shipmentsActivity logging and auditingBatch import/export of products in the product repositoryIntegrated payment system to integrate between various payment methods and known payment gateways

For the end user to visually comprehend the rich features of the Ubercart and Drupal platform, the following are some examples of success stories. All shops are built on top of Drupal with extensive use of Ubercart and its robust product catalog:

http://www.printcasting.com/, an online store with fixed layout for ad brooking on printed templates (top left)http://www.coco-mat.com, a store for fabrics and furniture with a flash animated product catalog (bottom right)A top notch themes proof of concept for an online store selling office furniture (bottom left)A Norwegian online bookstore and DVD shop (top right)

To learn more about Ubercart browse to http://www.ubercart.org or you can also visit a live site example page at http://www.ubercart.org/site.

Book details

This book will show you how to build a basic store using Drupal and Ubercart. We will guide you through the administrative section of the application and show you how to customize your store. Then, you'll learn how to manage categories, how to create products, and how to import them from external files.

As we proceed, you'll customize shipping, taxes, and payments, and learn about order management and customer relationship management. You'll install a ready-made Drupal template and you'll also learn how to create one from scratch. Finally, you'll learn how to create a better user interface and optimize your store.

The final store

The store that we are going to build in this book is a fully working electronics store.

So, let's see the most important sections.

The product catalog is the main navigation system in our store. We have our main categories and subcategories, offering a structured way to the clients to browse the website and locate their favorite products. When the visitors reach a page with no more subcategories, they can see a list of all the available products of this category.

When clients click on a product from the catalog, they can see all the details of this product. If it has attributes, like size or color, they also have to select them. Finally, they can add this product to the shopping cart or the wish list, depending on the functionality that we have installed.

The shopping cart is the page where the customers can check all the products that they have added so far. They can update the quantities, remove one or more products, or continue to the checkout page.

The checkout page is the final step of the shopping process. Here, the customer enters his or her delivery and billing information, selects a payment and a shipping method, and completes his or her order. After that, you, the shop owner, have to collect the products and fulfill the order.

Of course, one of the most important sections of the website is the administration section. You gain access to it by entering your username and password. Throughout this book, you'll spend all your time in this section, customizing not only the store pages, but also the complete Drupal installation.

Summary

In this chapter, we have gone through the following key points:

An introduction to Drupal, its history and development, and its main features and advantagesAn introduction to Ubercart with some samples of success stories of existing online stores using itThe general scope of this bookVisual and conceptual paradigms of the final outcome of the online store

In the next chapter we are going to install a basic Drupal site, add the Ubercart module, and start making customizations.

Chapter 2. Installation of Drupal and Ubercart

The beginning is half of everything. A proper installation of Drupal and Ubercart will save you from future headaches and will guarantee the correct functioning of your online store. This chapter is a quick installation reference for Drupal, the required Drupal modules, and Ubercart.

Ubercart is not a standalone e-commerce application, but it comes as a Drupal module. That means you have to first install Drupal and all the required Drupal modules on a server with the minimum requirements, before installing Ubercart. You don't have to be an expert programmer or a system administrator in order to complete the following process. We'll first give you a brief explanation of the underlying technologies, and then we'll continue with a step-by-step guide. At the end of this chapter, you'll have the online store installed on your local or remote machine and you'll be ready to make all the required customizations to the frontend and the backend, depending on your needs.

The topics that we will discuss in this chapter are:

Minimum requirements for Ubercart installationCreating a local environment using a web server, PHP, and a database serverUsing a commercial hosting serviceDownloading and installing Drupal and UbercartUsing UberDrupal, an Ubercart installation profile

Minimum requirements for Ubercart installation

In order to successfully install and use your online store, your system must meet the following requirements:

Operating systemWindows, Mac OS X, Linux, Unix, BSD, or SolarisWeb serverApache 1.2 or Apache 2.x, Microsoft IIS 6 or 7, lighttpdDatabaseMySQL 4.1 or MySQL 5.0, PostgreSQL 7.4PHPPHP 4.3.5. is required, but PHP 5.2.x is recommended

Now, let's elaborate a little more on the above requirements:

Operatingsystem: Drupal works fine in almost every operating system. Actually, you can transfer your Drupal installation from one operating system to another within minutes and no customization is required at all. All you have to do is to move the files and the database without altering any configuration files. For example, you can install Drupal on your local Windows or Mac computer, do all the customizations there, and then upload it to a Linux server to go live.Webserver: The web server is the software that accepts HTTP requests from browsers and delivers web pages to the users of our site. The most popular web server is Apache and we'll use it for our installation. It's secure, extensible, fast, and easy to customize. If you're not an expert in another web server, there is no reason to think of any other solution, because most of the available information and support is about Apache.Database: The purpose of the database is to store, organize, manage, and retrieve all the data of our website in a structured way. When referring to data, we mean not only the content that you put in your pages, but also every piece of information that Drupal uses for all its functions. In this book, we're using MySQL as a database. Today, it's the #1 open source database, and it's used in millions of websites and applications, from small personal web pages to enterprise systems with millions of users.

The MySQL database of a basic installation contains about 50 tables and every new installed module creates one or more new tables. If you check your database after the installation of Ubercart, you'll find that there are 100 tables in your database. These tables contain data such as pages, products, images, categories, orders, payments, caching information for your pages, theming information, comments from your visitors, menus, user information, and so on.

PHP: PHP is a scripting language, ideal for web development. It began as a small personal project, but soon became a very popular scripting language. Drupal is written in PHP, so it's absolutely necessary and there is no alternative to it. Drupal 6 works fine with PHP 4, but PHP 5 is recommended and that's what we're going to use in this book.

Some PHP extensions are needed for our installation. We'll mention them briefly here, so you can consult your hosting provider or examine your local system to check that everything is fine. The easiest way to check your PHP parameters is to use phpinfo. It's a function that returns information about the PHP environment on your server. All you have to do is to create a blank file named phpinfo.php in your server and insert the following code using a text editor:

<?php phpinfo (); ? >

This is a small PHP script that runs the phpinfo function and displays the results on your screen. If you browse to phpinfo.php, you'll see a page with your PHP configuration.

The basic PHP requirements are:

PHP memory requirements: 16 MBs are enough for basic sites; however, 64 MBs are recommended for more complex installations.GD2 library: GD2 is an image manipulation library for PHP. Ubercart needs this library, so if we want to put images to our products, it has to be installed.RegisterGlobals: This is actually a depreciated PHP feature, but some hosting providers with old systems still use it. It's a security risk, so it has to be disabled for Drupal to install.Safe mode: Drupal 6 doesn't support PHP's safe mode, because it causes problems to file uploads, so it also has to be turned off.

Creating a local environment using a web server, PHP, and a database server

When you start building your online store, it's better to do it on a local environment. There, you can do all the tests, experiment, try different options and solutions, and correct all the problems in a closed and secure environment before going live.

You have two basic choices: manually install and configure all the components, or use a complete web server package.

The advantage of the first choice is that you have the absolute control of the entire process, but its disadvantage is that it's time consuming and sometimes difficult to configure it right.

We prefer the second method, because it's fast, easy, and reliable.

We recommend XAMPP (http://www.apachefriends.org/en/xampp.html), a free distribution package for Linux, Windows, and Mac OS X, containing Apache, PHP, MySQL, OpenSSL for Secure Sockets Layer support, ProFTPD FTP server (FileZilla in the Windows version), and phpMyAdmin for the administration of MySQL databases. It's free, easy to install and uninstall, needs little or no configuration, easy to use, and very fast and stable.

So let's start the installation process:

Go to http://www.apachefriends.org/en/xampp.html. This is the download page for XAMPP. You'll see there that there are four basic distributions for Linux, Windows, Mac OS X, and Solaris. Here, we'll show you how to install it for Windows, but the process is almost the same for every other operating system.Select the appropriate distribution for your operating system. You will be transferred to a new page, where you can see specific details, frequently asked questions, some basic installation instructions, and configuration options. Click on the name of the file and select OK to download the file on your computer. It takes only a few minutes, depending on your Internet connection.When the download is completed, double-click on the file in your computer to open it and start XAMPP Setup Wizard. Leave the default settings and click on Next> until the installation process is finished.

If you check the root folder of your hard disk, you'll now see a new folder named xampp. Inside, there are all the files of the package. Among all the others there is one application file named xampp-control, which opens the control panel for XAMPP.

Double-click on xampp-control and open it. The Control Panel opens in a new window. It has a very simple layout, showing the three main applications (Apache, MySQL, and FTP), an indicator about the status for each one of them, and a button to turn them ON or OFF. If everything is OK, you'll see green indicators showing that all XAMPP components are Running.Now it's time to test that everything works. Using your browser, open the following URL: http://localhost. Select your language and you'll be transferred to the home page of XAMPP. On the left, there is a menu for all the basic actions. You can check the status of the applications, check the security of your installation and your pages, read online documentation about Apache, PHP, and MySQL, test and see the source code of some very interesting demo applications, and use some very useful tools like phpMyAdmin for the administration of MySQL databases and Webalizer for Web Stats.Before you download Drupal, you have to create a blank MySQL database. This database will be used by Drupal to store all the data of your site. So, from the left menu of the XAMPP home page, select phpMyAdmin, located at the bottom of the page. It will open in a new window. Under the label Create new database, enter the name of your database and click on the Create button to continue. If you haven't changed anything, the default MySQL username is root and there is no password.

That's it! Now your local environment is ready to install Drupal. If you're not going to use a commercial hosting service immediately, skip the next section and go to the Downloading and installing Drupal section.

Using a commercial hosting service

If you're in a hurry, or you just don't want to mess about with local web server installations, you can find a commercial hosting service and host your online store there. Nowadays, most companies support Drupal without any problem, because it's very popular and there is high demand for it. Look for a provider with reliability and speed of access, with plenty of web space and bandwidth. You need FTP access to upload the required files, and enough privileges to create a new database and to edit .htaccess and php.ini files.

Go to http://drupal.org/hosting to find a list of companies that provide Drupal hosting services.

When you select your hosting company and sign up, they'll give you a username and password and a link to access the Control Panel of your package and manage your website. In this section, we'll work with cPanel, but the process is almost identical for the other GUI control panels such as Plesk.

Before installing Drupal, you have to create a database. We'll show you here how to create a MySQL database, but a similar process is followed for a PostgreSQL database.

Browse to the URL of your cPanel (usually http://www.mysite.com/cpanel). Enter your username and password.You'll be redirected to the home page of cPanel. Select MySQL® Databases from the menu.Enter a name for your database and click on the Create Database button.Enter a username and a password and click on the Create User button.Check the ALL Privileges box and click on the Add Users to Your Databases button.Don't forget to take a note of the database name, the username, and the password; we'll use them during the Drupal installation.

Downloading and installing all the required Drupal modules

Now we have a functional Drupal site. Can we proceed with Ubercart installation? Not yet! First we have to install a few more Drupal modules.