The first step in setting up our online t-shirt store is to turn on a formidable array of modules to enable the Drupal Commerce module, and then set up product types for the merchandise that Sweet Tees sells: T-shirts and stickers. In this lesson we'll get the right modules enabled, configure our two product types, and then create some sample products to make sure it's all working the way we expect.
Additional resources
The Feeds module provides the capability to ingest data from any number of different sources and transform it into native Drupal constructs. It’s a versatile tool that can be used for things such as large-scale data migration, automatically populating a block of recent content from external sites, or synchronizing content posted among multiple sites. In this lesson we'll learn how Feed importers are created with the three main pieces of Fetchers, Parsers, and Processors.
Additional resources
Using Drupal, 2nd edition
Using Drupal source code
Feeds project
Now that we’re familiar with the Feeds module’s data import tools, let’s turn our attention to importing t-shirt products for Sweet Tees. Sweet Tees has kindly furnished us with a comma-separated values (CSV) file containing all of their t-shirt product data for this purpose. CSV is a common data export format from databases and spreadsheet programs. A CSV file is a simple text file that encodes a data set with each record on its own line, and a separator (such as a comma or tab) between the data values. In this lesson we'll create a feed importer for CSV files, map the CSV data to our Drupal Commerce products, and then actually import the CSV product data into our store.
Additional resources
Now that all of this groovy product data is showing up fine in the administrative interface, there’s just one problem: how do we expose these products on our public website to our customers? And further, how do we avoid displaying a product catalog with 25 entries in it, when from a customer’s point of view we only sell four products (three t-shirts and a sticker)? In this lesson we'll get an overview of how Drupal Commerce handles this with the concept of product displays and product attributes.
Additional resources
In this lesson we'll put what we just learned into action by creating a content type for product displays, and a few sample products to get the hang of how things work.
Additional resources
In this lesson we'll create a nice interface for browsing our products. We will categorize our product displays using the taxonomy system to get our like items grouped together. We'll walk through the process for creating a catalog vocabulary and terms, and then configure the content type and product type to bring it all together.
Additional resources
With our products nicely categorized, and the individual items looking good, the last step is to design a top-level catalog overview page using the Views module. In this lesson we'll create a catalog view and use relationships to pull in our product data. We'll also need to aggregate multiple products into one item so we don't have a crazy list of every possibility as individual items, and we'll wrap it all up nice and tidy by grouping the products based on taxonomy.
Additional resources
It’s easy to imagine that different kinds of stores might have certain things they want to have happen when various events take place throughout the purchasing process. For example, if someone adds more than 10 of an item to his cart, a store might want to provide a 10% discount. Or if someone was anonymous and then registers or logs in, a store might want to assign his old shopping cart to his newly found account. Traditionally, this kind of custom logic would have to be done in code by a programmer. However, the Rules module exposes a user interface for clicking together custom logic in a web-based interface. This increases accessibility to non-programmers, and also allows for bits of business logic to be shared among multiple sites with the Rules module’s import and export capabilities. In this lesson we'll review the main architectural blocks of the Rules module, covering events, conditions, actions, variables, and data selectors.
Additional resources
In this lesson we'll try a practical example of some Rules module concepts for the Sweet Tees store. Drupal Commerce’s Tax module stores its tax charging in Rules. Before we can open up our store to the public, we need to ensure that all applicable sales taxes are being applied to our items. Because Sweet Tees is based in California, we will need to charge 7.25% sales tax on all products sold if the customer lives in the state of California. This means we need to set up a conditional tax rate to only apply to California.
Additional resources
Of course, it’s one thing to have a bunch of products ready for purchase, but what Sweet Tees really cares about is accepting money for those products. They want to be able to accept credit card transactions on their online store. There's more than what's on your Drupal site involved in this though. In this lesson, we'll discuss merchant accounts and payment gateways—what they are and why you need them, along with providing payment security.
Additional resources
PayPal is a popular payment processor, especially for new site owners. It allows credit card transactions as well as payments from within PayPal itself. There are predominantly two “flavors” of PayPal’s payment processing tools: Website Payments Standard (WPS) and Website Payments Pro (WPP). For our purposes, we’ll be using Website Payments Standard, since there are no setup fees, no extra security setup required, and we can get started right away. In this lesson we'll create test PayPal buyer and seller accounts, set up access to the test sandbox, and make sure it is working properly.
Additional resources
Now that we have the PayPal side of payments set up, it’s time to set up the Drupal side of things. We’ll do this with the Commerce PayPal module, which is an extension of the main Drupal Commerce package. Just as we saw with Taxes, Commerce payment methods are Rules-enabled for maximum flexibility. In this lesson we'll walk through enabling the PayPal WPS payment method and configuring our PayPal sandbox access so that we can start taking test transactions on our store.
Additional resources
Using Drupal, 2nd edition
Using Drupal source code
Commerce PayPal project
The remaining element of our site is actually implementing the e-commerce portions: an online shopping cart and the ability to process orders, as well as reporting tools to tell us how our store is doing. We will now complete our store configuration by adding a shopping cart, configuring the checkout process, and placing a test order to make sure the whole store is actually working.
Additional resources
In this series, we have covered the basics of setting up an online storefront and shopping cart using the Drupal Commerce package for Drupal. However, there are several additional modules that you will likely want to consider before taking your online store live. We'll take a brief tour of:
Additional resources
In this series, we were able to set up a complete online store for our customer, Sweet Tees, using Drupal Commerce, a powerful, flexible e-commerce framework built on Drupal. We set up a payment system through PayPal’s Website Payments Standard. We also delved into the topic of data imports with the Feeds module, and covered tweaking Drupal’s functionality at various system points with the Rules module. In this lesson we'll tour the Sweet Tees site, discussing our implementation points, and reviewing the modules and resources we used.
Additional resources
Using Drupal, 2nd edition
Using Drupal source code
Up next: Using Drupal Appendix A: Installing and Upgrading Drupal
RedHen CRM is a Drupal-based customer relationship management tool. Many organizations use CRMs to help them manage the contacts they rely on to run successful campaigns. In this introduction tutorial, you will learn how to configure and use RedHen CRM, while also getting a tour of the features it provides. In the process, you will create contacts and organizations, and then use them to build a staff directory using the Views module and custom engagements scores with the Rules module. With that in place, you'll dive into what you have available in the Contact Dashboard, which is where you really get into managing your customers. You'll also get to see features such as contact deduplication to merge multiple contact records into one contact, and a list of resources to take things further than what is covered in this introduction.
If you want to follow along with the examples in this tutorial, you should be familiar with Views and Rules. You can learn more about Views in our Intro to Views for Drupal 7 Series, and you can learn more about Rules in the Learning the Rules Framework Series.
Additional resources
RedHen CRM website
RedHen CRM Drupal project
RedHen CRM Demo project
What Is Node.js?
FreeThis series is about integrating Node.js with Drupal 7 using the Node.js Integration contributed module on Drupal.org. The Node.js Integration project contains a number of submodules, and a separate Node.js application written in Javascript, that uses the Express, Socket.io, and Request packages.
Node.js is really fantastic for real time communications, something that Drupal is not particularly good at, out-of-the-box. The Drupal Node.js Integration module brings a host of real time capabilities and a client for your site to enable notifications when a variety of events occur, so your users can receive overlay notifications directly in their browser without page reloads!
In this series we'll cover:
- What Is Node.js?
- Install Node.js and the Node.js Drupal Module
- Configure Your Node.js Application
- Node.js Notifications Module
- Node.js Actions in Action!
- Content Update Messages with Node.js Subscribe
- Real-Time Log Viewing with Node.js Watchdog
- Node.js Checker, a Status Tool
- Get Ready for Production with Node.js
This series is a walk-through of how to get Node.js installed in your system, and how to install and configure the Node.js Drupal module, as well as a look at the related submodules. We'll install a different module that's dependent on the Node.js Drupal module. With this, you'll see how dependencies work in the context of the Node.js Drupal module's Node.js application's configuration.
Now, this series is not for the faint of heart. You'll need some Drupal administration knowledge, installing and configuring modules. We shall also be wildly typing things at the command line, so if you have some experience with command line use, that will definitely be helpful!
If you want to take your learning further, look for the self-check questions in the description for each tutorial in this series. These questions are presented to help you make sure you’re understanding the material, and to encourage you to explore how what you've just learned could apply to your own use case.
If you want to integrate Node.js and Drupal 7 so you can provide real time update notifications on your site, as well as a number of other real time communication options, this series is for you!
Additional resources
To use the Drupal Node.js Integration module, you need Node.js installed on your system, so in this tutorial, I will show you how to get this and the other dependencies installed on your system.
In this lesson, you will learn how to:
- Install Node.js on your system
- Test the version of Node.js installed
- Test the version of NPM installed
- Install the Node.js Drupal module
- Install the Node.js project dependencies with NPM
At the time of recording, I installed version v0.12.5 of Node.js. As the note on Node.js Previous Releases states: "Releases 1.x through 3.x were called "io.js" as they were part of the io.js fork. As of Node.js 4.0.0 the former release lines of io.js converged with Node.js 0.12.x into unified Node.js releases." - which explains the rapid version jump to the current 4.x releases.
You should make sure you have the latest version Node.js installed, particularly if there are security releases.
Note: Starting with version 7.x-1.11 of the Drupal module, the Node.js application is no longer bundled with the download. It can be downloaded seperately from GitHub or NPM.
Self-check question: Which version of Node.js do you have installed?
Additional resources
Note: This video is out of date and will be archived. Check this page for instructions: Node.js integration documentation.
To be able to use the Node.js Integration module, you need to configure both a Node.js application, as well as the Drupal Node.js Integration module itself.
In this lesson, you will learn how to:
- Enable the Node.js Config module
- Understand of all of the configuration options
- Generate a config file for our Node.js application
- Edit the generated configuration for a basic working setup
- Start the Node.js application
Self-check question: Did you remember to change the protocols array in your nodejs.config.js?