To get started, we'll need to create a content type to use for our product reviews. Based on the Super Duper Chefs requirements, in this lesson we'll:
- Create the Product Review Content Type
- Add a Field group
- Set permissions
Additional resources
Amazon.com is one of a large number of web-based businesses that have opened up their product information databases for other sites to access. In the case of Super Duper Chefs, we want to retrieve useful data like product photos, pricing, and manufacturer information for display on our own website. The Amazon module for Drupal allows us to do just that. In this lesson we'll take a look at the Amazon module, by starting with:
- What’s Included?
- Locale
- Referral settings
- Amazon keys
Additional resources
In a previous lesson in this series, we set up a content type for our product reviews. Now, we’re ready to add a field to store a link to the product on Amazon.com. In this lesson we'll:
- Enable and configure the Amazon module
- Get our Amazon key
- Add the Product Field
Note that Amazon changes the way they manage keys over time, so the way they are generated in the lesson may have changed. Please review the official AWS Product Advertising API documentation for current key generation instructions.
Additional resources
Giving visitors a chance to evaluate and rate content is an extremely common pattern on content-rich websites. In addition to giving visitors a way to jump to the best content, it can give you a way to determine what content on your site is most effective. In this lesson we'll discuss:
- Voting API module
- Fivestar module
Additional resources
For the Super Duper Chefs site, we’ll be using both of the Fivestar module’s unique features: adding a static Rating field to the “Product review” content type for the editors to use, and attaching a voting widget to the comment form on each review for the site readers to use. That approach will keep the official rating on each review separate from the reader ratings. In this lesson we'll:
- Add the Product Rating Field
- Add the Reader Rating Field
Additional resources
Drupal’s theming system gives designers complete control over how a site’s content is rendered for a web browser, and custom themes can give any site a distinctive look. But sometimes it’s useful to make minor tweaks to a site’s appearance using nothing but CSS rules. They allow designers to tweak font sizes, colors, and so on without altering the underlying HTML that defines the site’s structure. In this lesson we'll look at:
- CSS Injector module
- Explain how this works
Additional resources
Although our “Product review” content type has all of the data we need, the individual reviews still look a bit untidy. In this lesson, we’ll do some final tweaking to make the review display look nice and tidy.
- Setting Field Display Options
- Configuring CSS Injector
Additional resources
Now that we have a few products, we really ought to add a listing page that lets visitors look over all of the products that have been reviewed, comparing official ratings with visitor ratings and sorting by various criteria. This is a perfect job for Views. In this lesson:
- Create a Product Finder view
- Display Amazon information
- Display voting results
Additional resources
The Learn Drupal Ladder
CourseIn this series we introduce the Drupal Ladder project, and walk through the lessons in the Drupal Ladder.
In this video we'll be looking at some background on this project, and then we'll be looking at how you can actually get involved and progress to becoming a contributor yourself.
The Drupal Ladder Project was a community initiative that started in 2011. The purpose of the project was to get more people contributing to Drupal Core, by teaching people the skills that they need, exposing them to the tools that they need to use within the Drupal Community, and teaching people not just Drupal best practices in terms of code, but also how to actually interact and work with the community.
Additional resources
This video shows you how to download and do the initial setup of MAMP, which is Apache, MySQL and PHP for Macintosh. It shows some basic configuration tweaks to change the port from 8888 to the default of 80 so that you can just visit the localhost in the browser and get your Drupal installation to appear. It also provides a general orientation to MAMP, and some other initial configuration setting changes.
Next up: MAMP Server Configuration
Additional resources
More information on Development Environments
Install Git
FreeIn this video we walk through getting Git version control installed, and then show how to do a few basic things, including how to get a copy of the latest Drupal development code. This video follows the instructions found in the Install Git lesson on learndrupal.org.
This video is installing Git on Windows, because it has the most steps involved. Installation on Mac and Linux is very simple, in that they do not have a wizard to walk through, so they are not demonstrated. All commands used on the command line in the video work on Windows, Mac, and Linux, because Windows is using the Git Bash shell which is part of the Git installation.
Additional resources
In this step we turn our attention to Drupal.org and the community issue queue. This is where all of the active work for Drupal core takes place. We will look at the queue and create our issue to see how it works. This video follows the instructions for the Getting started in the issue queue lesson on learndrupal.org.
Test Patches
FreeIn this video we will walk through the process of testing existing patches in the Drupal.org issue queue. We will read an issue, download and apply the patch with Git, and then test it to see if it works. This video follows the instructions on the Test patches lesson on learndrupal.org.
The lines that I have in my .bash_profile (shown at the end of this video) to add the Git branch to my command line prompt is:
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export PS1="\h:\W \u\$(parse_git_branch)\$ "
I'm using a Mac, so your mileage may vary on other systems.
Write a Patch
FreeIn this video we will write our own patch to resolve an issue. We will take a screenshot of the issue before and after our patch, and upload the images and patch to the Drupal.org issue queue. This video follows the instructions in the Write a patch lesson on drupalladder.org.
In this lesson, we will cover the basics of getting code into version control using the Mac app "Tower" and then making the first commit and pushing it to the remote repository we will setup on beanstalkapp.com.
Features is a module which generates modules for us. You can then extend that module just as you would any other Drupal module. In this video we'll add some additional code to our feature to make it more complete for our needs, outside of the realm of what Features itself can provide.
The features module (and the drush command) are pretty smart about not overwriting custom changes, and your chances of overwriting your custom code are pretty slim. When features exports a module it creates a .module file with only one line of code in it. Which is an include for another file: mymodule.features.inc. Features then puts all of the automatically generated code into this included file. When you regenerate or update a feature it just uses the existing mymodule.module file which maintains any code that you wrote, and then regenerates the mymodule.features.inc and associated files.
Additional resources
Features project (Drupal.org)
Introduction to Drush Series (Drupalize.Me)
https://github.com/DrupalizeMe/drupalize-lullablog (GitHub.com)
James Sansbury defines Features (a module that helps organize site components and applications for specific use cases), as distinct from Nodes and other forms of site content.
Prerequisites
This series assumes that you can install Drupal 7, create a basic content type, create a basic view, and use Drush. See the following resources if you need a refresher:
- Create a New Content Type
- Creating a New View
- Introduction to Drush series
- Installing Drupal with Drush
Additional resources
Features project (Drupal.org)
We'll create our very first feature and then see how it works by putting on our production site and enabling it.
Additional resources
Features project (Drupal.org)
Introduction to Drush Series (Drupalize.Me)
Hands-On: Generating Sample Content (Drupalize.Me)
https://github.com/DrupalizeMe/drupalize-lullablog (GitHub.com)