IntroductionWelcome| 00:03 | Hi! I am Tom Geller, and this is Create Your
First Online Store with Drupal Commerce.
| | 00:09 | This course will show you how to
sell whatever you want over the Internet
| | 00:12 | without paying the big fees that
sites like Amazon and eBay charge.
| | 00:16 | I'll show you how to set up your store,
add products, charge for shipping and
| | 00:20 | taxes, manage orders and customers, and
improve your store's reach for increased sales.
| | 00:27 | While you don't have to be a
professional, the tools you'll be using are of
| | 00:30 | pro quality, and no matter how
successful your store becomes, Drupal
| | 00:34 | Commerce will grow with it.
| | 00:36 | As its name implies, Drupal Commerce is
built on top of Drupal, a free program
| | 00:41 | for building awesome Web sites.
| | 00:43 | If you want to know more about Drupal
generally, lynda.com's Drupal 7 Essential
| | 00:47 | Training course is a good place to start.
| | 00:50 | Let's get started with Create Your
First Online Store with Drupal Commerce.
| | Collapse this transcript |
| Previewing the finished project| 00:00 | This course focuses on how to create an
online store that functions beautifully.
| | 00:05 | There is a lot to learn, so we don't
focus much on the look of the site, but
| | 00:08 | there is a lot of beauty under the hood.
| | 00:10 | This video shows you what it is, while the
rest of the course shows you how to get there.
| | 00:15 | The first thing that you'll notice
about our store is that it looks like other
| | 00:18 | stores you see on the Internet. It's
a list of products, with Add to cart
| | 00:22 | buttons, and if you click on anyone
of these, you see a larger picture, and
| | 00:25 | perhaps more information.
| | 00:27 | But let's go back to our front page,
and actually add something to our cart.
| | 00:31 | We see it in the cart here, and if we
go in through this View cart link, we can
| | 00:35 | change its quantity -- say we want 2 things
of bath salts -- or remove items, and so forth.
| | 00:42 | But a store isn't just about the
products you sell; you also want to be able to
| | 00:46 | add tax and shipping costs on top
of that, and then fulfill the order.
| | 00:50 | We do that here by going up to
Configure store, and there you see, for
| | 00:53 | example, Payment methods.
| | 00:55 | You can change how people are able to pay,
or you can change how they're able to
| | 01:00 | specify Shipping, and as I mentioned
before, you can define taxes, including
| | 01:06 | changing whether taxes are charged in-
state or out-of-state, using American style
| | 01:11 | sales tax, or European style VAT.
| | 01:15 | Let's go through an order so we see what
the customer sees as they use our store.
| | 01:19 | As I showed you, they first see a
cart, and then go to a checkout page.
| | 01:23 | You'll notice that the
tax has already been added here.
| | 01:26 | I filled out my billing and shipping
information earlier, and it remembered it,
| | 01:31 | so we'll Continue on.
| | 01:33 | Finally, we get a confirmation, and
this is where you're able to pay.
| | 01:38 | Add my credit card number; change the
expiration date to someday in the future.
| | 01:44 | This is a standard void number for
credit cards, by the way, and continue, and
| | 01:51 | finally we're told that our order is complete.
| | 01:54 | Both the customer and the administrator
of the site can view the order to make
| | 01:58 | sure everything is okay, and in fact,
the administrator is able to go back into
| | 02:01 | orders, and edit them to add payments,
remove payments, change the amount of
| | 02:07 | things that are being sold, and so forth.
| | 02:08 | You have an enormous amount of
control for setting up discounts, payment
| | 02:13 | systems, shipping methods, and workflows.
| | 02:15 | For example, you could put the whole
checkout process on a single screen, or
| | 02:20 | just get rid of the payment
part if you're giving things away.
| | 02:23 | Your store contains a powerful
subsystem called Rules, which you can get to by
| | 02:27 | clicking Configuration, and
scrolling down, and Rules.
| | 02:31 | You also reach certain rules by
clicking different parts of your store.
| | 02:35 | One example is that you could give
the first 500 purchasers of something a
| | 02:39 | special bargain, or cut off a giveaway
at a certain time, or even limit sales to
| | 02:43 | those that are shipped within certain states.
| | 02:46 | You would do that by editing the rules.
| | 02:49 | Finally, as I mentioned before, your
store is built on Drupal; one of the world's
| | 02:53 | most popular platforms for building Web sites.
| | 02:56 | So you can change its appearance by
going up to Appearance, and selecting a
| | 03:00 | different theme, such as
I've done here with Danland.
| | 03:02 | Let's see what that looks like.
| | 03:05 | When I close the overlay, we see a
completely different look for our site, but
| | 03:10 | I'll go ahead and switch it back.
| | 03:15 | You're also able to build your own
themes, or modify those that are available
| | 03:18 | for free on Drupal.org.
| | 03:21 | Finally, you can take advantage of
the literally thousands of free add-ins
| | 03:25 | called modules that add functionality to Drupal.
| | 03:28 | To see those go to drupal.org/project/modules.
| | 03:36 | Since we're using Drupal 7, we'll
filter by compatibility, so we only see
| | 03:39 | those for Drupal 7. Wow!
| | 03:41 | Over 2500 modules available.
| | 03:44 | You'll see all of these things in this
course, but again, we'll focus pretty
| | 03:48 | narrowly on features that are
specific to building a store.
| | 03:51 | While you don't have to know Drupal to
take this course, that knowledge would go
| | 03:55 | a long way in making your store even better,
| | 03:57 | so I recommend you also consider taking
other lynda.com courses on the subject,
| | 04:02 | particularly Drupal 7 Essential
Training, but even without that, by the end of
| | 04:06 | this course, you'll have all that
you need to build a great store.
| | Collapse this transcript |
| Surveying the store-building process| 00:00 | In the video previewing the
finished project, you saw how the store will
| | 00:04 | look when it's finished.
| | 00:05 | This video will show you, in the most
general sense, how it got to be that way,
| | 00:09 | starting with a fresh installation
of Drupal, with a tiny bit of site
| | 00:12 | configuration, and
finishing with a successful order.
| | 00:16 | It's going to go way too fast for you
to follow along, and you won't find any
| | 00:19 | exercise files for this video. I just
want to give you an idea of how it flows.
| | 00:24 | The first thing we did was to
install Drupal Commerce using the Commerce
| | 00:27 | Kickstart distribution.
| | 00:28 | You'll find it at drupal.org/
project/commerce_kickstart.
| | 00:33 | I've already done that. You can
learn how in the video, Installing Drupal
| | 00:40 | Commerce using Commerce Kickstart. And
there is our store, already installed.
| | 00:46 | Now we start configuring things.
| | 00:47 | I'll start by changing the appearance a bit.
| | 00:50 | Go up to Appearance, change our
Settings, and now we can toy around a little
| | 00:56 | bit with, let's say, the colors of the
heading up here. Make it a sort of olive
| | 01:01 | green; a slightly darker olive green,
and go down to the bottom, and save.
| | 01:08 | Of course, you'll want to do a lot more
customization when you build your own store.
| | 01:15 | I've found that most people want to set
up the site's look right away, but you
| | 01:18 | can actually change it at any time; even after
you have hundreds of products in the catalog.
| | 01:22 | I'll show you a little more about
altering your store's appearance in the video,
| | 01:25 | Configuring your store's basic information.
| | 01:28 | Now it's time to set up those products.
| | 01:30 | Drupal Commerce puts everything
related to commerce -- the products, order,
| | 01:34 | shipping, and so forth --
in the Store menu up here.
| | 01:38 | There are also additional links here on
this Gray bar -- what's called the shortcut
| | 01:41 | bar -- and one of them is Add product.
| | 01:45 | I'll create a bottle of olive oil
for our fictional olive oil company;
| | 01:48 | the SKU will be 10001; 1 liter of olive oil.
| | 01:55 | I happen to have an image already on
the Desktop; we'll go and find that. And
| | 02:08 | the price, let's say, is $8.00.
| | 02:12 | I'll show you more about products in
the video, Setting up individual products.
| | 02:16 | So now your store has a product in its
warehouse, so to speak, but you still need
| | 02:20 | to bring it out for customers to buy.
| | 02:22 | In Drupal Commerce, you do that with
something called a product display.
| | 02:26 | I'll add that by going up to
this link: Add product display.
| | 02:31 | This will also be 1 liter bottle of
olive oil; scroll down, link it to the
| | 02:42 | product that we just created, and save.
| | 02:49 | Now if we go back to the front page
of our store, we see our product, and
| | 02:53 | amazingly, we can already start
shopping. Everything is already built in.
| | 02:57 | I'll show you that by clicking Add to cart,
and actually completing the order process.
| | 03:02 | We could then view our cart, change the
Quantity if we want -- let's say we want 2
| | 03:06 | bottles instead -- remove items
if we want, and then checkout.
| | 03:12 | Now, we haven't set up any taxes or shipping,
but this is where it would normally show up.
| | 03:28 | Finally, we review our order, make a
test payment, and finish, and there we are.
| | 03:36 | We've actually completed an order on
our site, and as you saw, it didn't take
| | 03:39 | very much set up at all.
| | 03:41 | So that's the abbreviated version.
There is a lot that I left out, but don't
| | 03:45 | worry: I'll show you it all
by the end of this course.
| | 03:48 | Now, I'm not going to use the site I
just created throughout the course, so I'm
| | 03:51 | just going to quickly delete it.
| | 03:53 | I'll do that by going back to Acquia
Dev Desktop, selecting the store that I
| | 03:58 | just created, and deleting it.
| | 04:03 | I can complete the process by going
back to my Desktop, and throwing away the
| | 04:06 | files that comprise that store.
| | 04:09 | If you're really eager to get started,
and don't want to watch the whole course,
| | 04:12 | I give a version that's a little bit
less abbreviated, but still short, in the
| | 04:16 | section jumpstart to sales.
| | 04:18 | But I do recommend you set aside
time to watch everything in the course.
| | 04:22 | Once you start working with Drupal
Commerce, you'll find yourself wanting to take
| | 04:25 | advantage of the many features
and options that it provides.
| | Collapse this transcript |
| Using the exercise files| 00:00 | If you have access to the exercise
files that come with this course, you
| | 00:04 | have all the components you need to follow
along with the videos on your own computer.
| | 00:09 | There are two kinds of files. The first
kind are content files, such as text and
| | 00:13 | images that you add to your
site as the course progresses.
| | 00:16 | If you don't have access to the exercise
files, you can use your own text and images.
| | 00:21 | The second kind of exercise files bring
your site up to a certain point in the course.
| | 00:26 | That way you can start at any point
in the course, and continue from there.
| | 00:30 | There are two different kinds of procedure.
| | 00:33 | The first kind of procedure, you use
only the first time you're installing
| | 00:36 | Drupal on your computer.
| | 00:38 | The second procedure brings you
up to any point in the course.
| | 00:41 | I'll go through both procedures now.
| | 00:44 | If you're using Drupal Commerce
Kickstart for the first time, you would use this
| | 00:47 | folder: 0000-drupal-commerce-kickstart-base.
| | 00:52 | The folders you need are inside twotrees.zip.
| | 00:55 | This is in a compressed file.
| | 00:57 | On many versions of Windows, and on all
versions of Mac, you can open this simply
| | 01:01 | by double-clicking it.
| | 01:03 | If you're on an older version of
Windows, however, you may need an uncompression
| | 01:06 | utility. The one that I like is called 7-Zip.
| | 01:13 | But we'll just open this by double
-clicking it, and then we'll take the
| | 01:17 | twotrees folder that's inside it,
copy it, and put it where we want our
| | 01:21 | Drupal installation to be.
| | 01:23 | In our case, that's on the Desktop.
| | 01:25 | This may take a while.
| | 01:27 | We then import these files into
the Acquia Dev Desktop AMP Stack.
| | 01:32 | We've already downloaded it
from acquia.com/downloads.
| | 01:36 | If you haven't already
done so, you'll find it here.
| | 01:39 | You can download either a Windows or a
Mac version. It doesn't matter if you say
| | 01:43 | Drupal 7, or Drupal 6, since we'll be
using a completely different version of
| | 01:47 | Drupal from what's included in the Dev Desktop.
| | 01:50 | Once you have it up and running, you click
this localhost pop-up menu, and go to More.
| | 01:56 | Then click Import.
| | 01:57 | Click Browse next to Site path, and
find the folder that you just copied.
| | 02:01 | Here it is: twotrees. Click OK, and
then say that you want to create a new
| | 02:06 | database by clicking this radio button.
| | 02:09 | The database name must be
twotrees; T, W, O, T, R, E, E, S.
| | 02:17 | The server must also be
twotrees, then click Import.
| | 02:24 | When that's done, you can then
finish the installation using the Commerce
| | 02:28 | Kickstart installation profile.
| | 02:30 | You can see how to do this in the
video, Installing Drupal Commerce using
| | 02:34 | Commerce Kickstart, and in fact,
I'll very quickly do that.
| | 02:38 | Alternately, you can import the database
that was in the same folder as twotrees,
| | 02:43 | and that's what we're going to do.
| | 02:44 | We go to Acquia Dev Desktop, close out
this window, so we're back at our main
| | 02:49 | screen, and then say Manage my database.
| | 02:53 | We see the twotrees database that
Acquia Dev Desktop created. However, it
| | 02:59 | contains no tables, so we're going to
click Import, and then Browse, then go
| | 03:05 | to our exercise files.
| | 03:09 | In that drupal-commerce-
kickstart-base, you'll see a file
| | 03:12 | labeled twotrees.sql.zip.
| | 03:16 | We click that, and then
click Open, and then click Go.
| | 03:20 | This may take a while.
| | 03:21 | Incidentally, as I'm making this
video, there is a bug in some browsers that
| | 03:25 | causes the screen to hang at this point.
| | 03:27 | I've found that Firefox works best, but
by the time you see these videos, you may
| | 03:32 | find that any browser works just fine.
| | 03:34 | If you have that problem, switch to Firefox.
| | 03:37 | There; it's all done.
| | 03:39 | If it works correctly, you'll see
this message that the Import has been
| | 03:42 | successfully finished.
| | 03:43 | We can tell it if it's true by going
back to Acquia Dev Desktop, selecting
| | 03:47 | twotrees from the pop-up,
and then saying Go to my site.
| | 03:51 | You can then log in to your site.
| | 03:53 | By default, in all of the exercise
files, the Username is admin; A, D, M, I, N. And the
| | 03:59 | Password is drupal with a lowercase d;
so d, r, u, p, a, l, and I just click Log in,
| | 04:06 | and I'm ready to go.
| | 04:08 | So that's the first time you
set up your exercise files.
| | 04:11 | If you want to bring it up to a certain point
in the course, I'll show you how to do that now.
| | 04:16 | We'll go back to our exercise files,
and open up something much later on;
| | 04:21 | let's say 0501-shipping.
| | 04:24 | Inside there, there are two kinds of files;
| | 04:26 | sites, and this one that ends in .sql.zip.
| | 04:30 | The sites folder will replace what's
in your current Drupal installation.
| | 04:34 | First we have to throw away what's in
there, or move it to another location.
| | 04:38 | Remember that by doing this, you'll
be destroying your existing site,
| | 04:41 | so if you want to save it, back it up
using the techniques that you learned
| | 04:45 | in Drupal 7 Essential Training. But for us,
we'll open this up, and throw away the sites folder.
| | 04:53 | Then I'll open up the sites file -- again
it's compressed -- take that sites folder,
| | 04:58 | and put it inside twotrees.
| | 05:01 | This may take a while.
| | 05:04 | Then we replace the database with a
database file that's here: twotrees.sql.zip.
| | 05:10 | To do that, go back to Acquia
Dev Desktop, and Manage my database.
| | 05:15 | We have to clear out what's already in
twotrees, so we click the database here,
| | 05:21 | and that shows us all of the tables.
| | 05:23 | Scroll to the very bottom, and then
click Check All, then select Drop.
| | 05:31 | We'll be asked to confirm our decision;
we do want to do that, so click Yes.
| | 05:36 | If that works, you'll see this
message at the top that it's been
| | 05:38 | executed successfully.
| | 05:40 | We're now ready to import our new database.
| | 05:43 | Click the Import tab, then click
Browse, and find the file that you need.
| | 05:50 | We were going to do 0501, so I'll go down there,
select .sql.zip, and Open, and then click Go.
| | 05:58 | This may take a while.
| | 06:00 | If this works, you'll see the Import
has been successfully finished message, and
| | 06:04 | we can prove that it worked by going
back to Acquia Dev Desktop, selecting
| | 06:09 | twotrees, and clicking Go to my site.
| | 06:12 | Once again, you may have to enter your
Username and Password, which is admin
| | 06:17 | and lowercase drupal.
| | 06:18 | Click Log in, and you're good to go.
| | 06:21 | I do want to remind you that this
process will only bring you up-to-date in the
| | 06:26 | version of Drupal that I
used when I recorded this.
| | 06:29 | If you turn this into a public site, you
must update it, or you'll leave yourself
| | 06:33 | open to security holes.
| | 06:34 | So please do take a look at that in
the Drupal 7 Essential Training course.
| | 06:38 | Now, I know that seems like a long
procedure, but believe me, you get used to
| | 06:42 | it after a few times.
| | 06:43 | Now, I have to admit that it doesn't
always go as smoothly as you saw here.
| | 06:48 | If you have any problems,
first check my site: tomgeller.com.
| | 06:52 | I'll post help there as needed.
| | 06:54 | If all else fails, you can get help
from lynda.com while you're logged in.
| | 06:59 | Just go up to the Support
menu, and select Contact Us.
| | 07:04 | Then select the correct technical
support option from under Technical Support,
| | 07:07 | and send your message.
| | 07:09 | Now let's get started!
| | Collapse this transcript |
|
|
1. Setting Up Drupal CommerceInstalling Drupal Commerce using Commerce Kickstart| 00:00 | If you're already a Drupal user, you
might get the itch to just install Drupal
| | 00:04 | Commerce by downloading all the modules
separately, and then configuring them by hand.
| | 00:09 | You can do that.
| | 00:10 | Details about what you need are on
the page at drupal.org/project/commerce.
| | 00:15 | If you go to that page and scroll down a
little bit, you'll see the requirements
| | 00:18 | here, and there is quite a long list of them.
| | 00:21 | Fortunately, there's an easier way.
| | 00:23 | The folks who created Drupal Commerce
also created an installation profile that
| | 00:27 | includes all those pieces
and it preconfigures them.
| | 00:31 | That saves us a lot of time, and
we're going to use this Kickstart version
| | 00:34 | throughout the course.
| | 00:35 | To get started, I am going to assume
that you've downloaded and installed Acquia
| | 00:39 | Dev Desktop, which was formerly called
the Acquia Drupal Stack Installer, or DAMP.
| | 00:44 | To get it, go to acquia.com/downloads.
| | 00:49 | Then scroll down to Dev Desktop.
| | 00:52 | The site will automatically
indicate the platform that you're using.
| | 00:55 | In our case, Windows, but a
version is also available for Mac.
| | 00:58 | It doesn't really matter whether
you choose the Drupal 6 or Drupal 7
| | 01:01 | version, since we are not actually going to be
using the Drupal that comes with Dev Desktop.
| | 01:06 | If you have any trouble with
this step, see lynda.com's Drupal 7
| | 01:09 | Essential Training course.
| | 01:11 | Once you have Acquia Dev Desktop running, go to
| | 01:14 | drupal.org/project/commerce_kickstart.
| | 01:21 | Once there, scroll down, and
download the version you want.
| | 01:24 | Since we're on Windows, I am going to
use the zip copy, although if you're on
| | 01:28 | Mac or Unix, you can also use the .gz
version, which is a little bit easier to
| | 01:32 | install, and is also a smaller download.
| | 01:34 | I recommend that you use the one
that's in green here, which is the
| | 01:37 | latest stable version.
| | 01:39 | If you want to be on the bleeding edge,
you can try the development release,
| | 01:42 | which is down here in red.
| | 01:44 | But for us, we will just click zip, and
then go to our download location, which
| | 01:48 | in our case is on our Desktop.
| | 01:50 | Once there, you uncompress the file.
| | 01:52 | On Windows, I do that by double-clicking,
and taking the contents, and dragging
| | 01:56 | them to the Desktop.
| | 01:58 | This part might take a while.
| | 02:02 | Once you've uncompressed the files,
you can close this window, and throw
| | 02:05 | away your zip file.
| | 02:08 | I'm also going to rename our
installation here, from drupal-7.8, to twotrees.
| | 02:13 | That reflects the name of the site that
we will be working with throughout this
| | 02:16 | course: Two Trees Olive Oil; a
fictional company in California.
| | 02:20 | The next step is to import this
site through the Acquia Dev Desktop.
| | 02:24 | To do that, we switch to our Dev
Desktop Control Panel, go to our little pop-up,
| | 02:29 | and More, and click Import.
| | 02:32 | You then select the
folder that we've just created.
| | 02:35 | It's on the Desktop at twotrees,
and OK, and create a new database.
| | 02:40 | You can name this whatever you'd like,
but just for consistency's sake, I'm going
| | 02:44 | to call this twotrees, and the server I
will also call twotrees, and then Import.
| | 02:55 | Once the import is complete, you
will see a fairly standard Drupal
| | 02:58 | installation screen.
| | 02:59 | The big difference between
this, and core Drupal, is this extra
| | 03:02 | selection: Commerce Kickstart.
| | 03:04 | Select it, and click Save and continue.
| | 03:06 | We are installing in English, so we
will just click Save and continue, and then
| | 03:12 | Drupal Commerce goes through the
standard Drupal installation process, but
| | 03:16 | adding a few extra pieces,
that make it Drupal Commerce.
| | 03:19 | This may take a while.
| | 03:21 | When that's complete, you will have
the opportunity to change some of the
| | 03:25 | information on your site.
| | 03:26 | You will be able to change this again
later, so it doesn't really matter that
| | 03:29 | much what you put here.
| | 03:30 | But we will just put up Drupal
Commerce, and for our site e-mail address, it
| | 03:36 | will just be admin@example.com, although of
course, you should use your own e-mail address.
| | 03:42 | Our Username will be admin, and for a
Password, we are going to use drupal,
| | 03:46 | with a lowercase d;
d, r, u, p, a, l.
| | 03:50 | We use that administrator username and
password, admin and drupal, throughout this
| | 03:55 | course, all in lowercase.
| | 03:57 | That's important, because when you use
the exercise files, you may need to enter
| | 04:00 | that username and password.
| | 04:01 | Of course, you can use whatever
username and password you want.
| | 04:05 | In fact, you shouldn't use these in any
site that you intend to face the public.
| | 04:09 | We will scroll down, and Save and continue.
| | 04:12 | We are almost done, and then there's one
final step that's specific to Drupal Commerce.
| | 04:18 | If you're setting up a site, and you
want to just learn how to use it, and play
| | 04:21 | around a little bit, it's a good idea
to let it install these sample products
| | 04:25 | and product display nodes.
| | 04:26 | I'll be showing you how to
create these things yourself,
| | 04:29 | so I'll uncheck them, and then click
Create and continue. There we are!
| | 04:34 | To visit our new site, we click
this link, and we're all done.
| | 04:39 | Now, for you experienced Drupal folks, I
want to show you something very quickly
| | 04:43 | about how Commerce Kickstart sets things up.
| | 04:45 | It's a little different from how
standard Drupal does things, and that means you
| | 04:48 | have to watch out when you update your site.
| | 04:51 | To show you that, I will go back to my
Desktop, and open up my twotrees folder.
| | 04:56 | Now, normally in Drupal, all of the
information that's specific to your site is
| | 05:00 | in this sites folder here.
| | 05:02 | It would be an all, and then
modules would contain the modules.
| | 05:05 | But you don't see them here.
| | 05:07 | Because this is an installation
profile, all of that information is stored
| | 05:11 | inside profiles, in this
commerce_kickstart folder.
| | 05:15 | Now, I am talking about the things
that are specific to Drupal Commerce;
| | 05:19 | the modules, and the way
that it's set up, and so forth.
| | 05:22 | If we open this modules folder,
we see some of that extra stuff.
| | 05:25 | In fact, this commerce folder
contains all of the stuff that's specific
| | 05:28 | to Drupal Commerce.
| | 05:30 | I mention this because if you try to
update the site in the normal way, by just
| | 05:34 | replacing everything except for the
sites folder, you will actually lose all of
| | 05:38 | your commerce functionality,
| | 05:39 | so be careful about that.
| | 05:41 | Now, some of you might scoff at the
idea of using this prepackaged version, but
| | 05:45 | it is the method that I recommend.
| | 05:47 | I mean, why reinvent the wheel?
| | 05:49 | The less time you spend installing, the
more time you will have to build your site.
| | 05:53 | And if you don't like the way this
installer does things, well, you can install
| | 05:57 | Drupal Commerce manually.
| | 05:59 | Just go to drupal.org/project/commerce,
and follow the instructions there.
| | Collapse this transcript |
| Configuring your store's basic information| 00:00 | When we last left our site, we
had installed Drupal Commerce using
| | 00:04 | Commerce Kickstart.
| | 00:05 | Now we will do a few basic tweaks to the
site, just so that we can make it more of our own.
| | 00:09 | The first thing that we're going to do is
we are going to change the name of this site.
| | 00:12 | Then we will change the logo here, and
also this little thing up in the corner,
| | 00:16 | which is known as the Favicon.
| | 00:18 | Finally, I'm going to add a search
bar up here in the upper-right corner.
| | 00:21 | I recommend that for all sites, unless
you have a special reason not to allow
| | 00:24 | people to search your site.
| | 00:26 | Everything that we do in this video
is just basic Drupal configuration.
| | 00:30 | That stuff is under the configuration
link here at the top, whereas most of the
| | 00:34 | stuff that you will see in this course
is under the Configure store link here.
| | 00:38 | If you want to learn more about
configuring your site in general, see my course,
| | 00:42 | Drupal 7 Essential Training.
| | 00:44 | If you've gotten this far by setting
Drupal Commerce up from scratch, that is,
| | 00:48 | without using the Kickstart the way
that I showed you, then you will first have
| | 00:51 | to turn on two modules in
order to use Drupal Commerce.
| | 00:54 | To do that, you go up to Modules, and
either scroll down the page, or close up
| | 00:59 | these groups, until you get
to the Commerce group here.
| | 01:01 | The two modules that you will need to
turn on are Commerce, and Commerce UI, but
| | 01:06 | as you see, we already have them,
| | 01:07 | so I will just close out here. All right!
| | 01:10 | Let's move on to configuring our site.
| | 01:12 | The first thing we are going to
do is to change the name here.
| | 01:15 | The way you do that is by going up to
Configuration, and clicking Site Information.
| | 01:21 | Here I am going to change it to the
name of our fictional olive oil company:
| | 01:25 | Two Trees Olive Oil.
| | 01:27 | You can also add a slogan.
| | 01:30 | It's optional, but I am going to add one;
| | 01:32 | The Best Olive Oil in the World.
| | 01:35 | You can also change your e-mail address,
and a few other settings here, but for
| | 01:40 | now, I'll just click Save configuration,
and close out the overlay, so we can see
| | 01:43 | what that looks like. There it is!
| | 01:46 | It did exactly what we thought it would do.
| | 01:49 | The next thing I am going to do is
to change the appearance a little bit.
| | 01:52 | This is what Drupal calls a theme, and
you reach it by going to Appearance, and
| | 01:57 | then down to the Settings link next to
whatever the enabled and active theme is;
| | 02:01 | by default that's Bartik.
| | 02:02 | So I will click Settings, and see all of
the things that I can change on the page.
| | 02:06 | Now, you will see that
there's a color set up here.
| | 02:10 | By default, it's Blue Lagoon, but if I
change it to, let's say, Plum, that changes
| | 02:13 | many of the colors throughout the
site ,and you can see a preview of this by
| | 02:17 | scrolling down a little bit, and there it is.
| | 02:19 | I am going to return it to Blue Lagoon,
and just change a couple of colors to
| | 02:23 | make it more olive-like.
| | 02:25 | First thing I'll do is in the header,
I am going to turn it to some kind of
| | 02:28 | green; make it a kind of lightish green.
| | 02:32 | Something like that, let's say,
and scroll down and see. Oh,
| | 02:35 | that looks pretty good.
| | 02:36 | Maybe make the bottom a similar kind of green.
| | 02:38 | So go over here, and click around.
| | 02:41 | That actually looks pretty good.
| | 02:44 | You can also change the
values by typing them in directly.
| | 02:47 | So here I'll change it to hex value
292929, for example, and you see it change in
| | 02:52 | your preview live as you do that.
| | 02:53 | If I scroll to the bottom, and click
Save configuration, and close out the
| | 02:58 | overlay as I did before, we see those
take effect immediately. Very good!
| | 03:04 | But you're probably wondering, how can
I replace that silly looking face, and
| | 03:08 | put in my own logo? Well, that's easy.
| | 03:11 | If you're a premium subscriber to lynda.com,
or received the series on disk, you
| | 03:15 | will find graphics to do
so in your exercise files.
| | 03:18 | If not, you can use your own, of course.
| | 03:20 | You do it by going up to Appearance,
and then once again changing the
| | 03:24 | settings of your theme.
| | 03:26 | Scroll down to the bottom where you
have the options to change the logo, and the
| | 03:30 | shortcut icon, which is
also known as the Favicon.
| | 03:32 | I will remove the default logo, and
click Choose File, and then find my file.
| | 03:38 | Here it is: logo.png.
| | 03:41 | Click Open, and then do the
same for the shortcut icon.
| | 03:45 | Remove the default, and
add our little icon here,
| | 03:48 | the Favicon, and then Save configuration,
and then turn off the Overlay so we can
| | 03:54 | see the effects of our work.
| | 03:57 | Indeed, there's our logo, and up
here in the corner is our Favicon.
| | 04:02 | Now, the location of the Favicon changes
depending on which browser you're using.
| | 04:06 | In Firefox, I believe it's in the
address bar, and so on, but it does add a nice
| | 04:10 | little touch that many people forget,
which means that yours is going to look
| | 04:13 | especially good by comparison.
| | 04:16 | The last change I am going to make is to
add a search bar up here in the corner.
| | 04:20 | There are two things I have to do.
| | 04:22 | First, I'm going to move a block into this area.
| | 04:25 | I do that by clicking on Structure, and Blocks.
| | 04:29 | Now, the way the block system works,
| | 04:31 | the entire page is broken in to block
regions, and you can see those by clicking
| | 04:36 | Demonstrate block regions, and there
is a header, featured, a few different
| | 04:41 | triptychs at the bottom, and so on.
| | 04:42 | I am going to put mine in the header region.
| | 04:45 | So I'll exit out of this demonstration,
and find the search block that I need.
| | 04:50 | It's all the way at the bottom under Disabled.
| | 04:53 | Change it into Header, and Save.
| | 04:57 | To see it, once again, I close
the Overlay, and there it is.
| | 05:01 | You'll learn more about blocks in
my Drupal Essential Training Course.
| | 05:05 | There is one problem with this, however.
| | 05:08 | By default, only the
administrator gets to search the site.
| | 05:12 | To change that, you will go up to
People, and Permissions, and then find the search
| | 05:17 | group down here at the bottom.
| | 05:18 | I am going to let everybody use the
search; both the administrator, and
| | 05:26 | authenticated users -- that's those
people who are signed in -- and those people
| | 05:30 | who aren't signed in;
| | 05:31 | those are anonymous users.
| | 05:32 | Scroll down to the bottom, and Save again.
| | 05:36 | As always, we close our Overlay
to see the effects of our changes.
| | 05:40 | In this case, we don't see any, since
we could already use the search box.
| | 05:44 | The reason I mentioned the search box,
by the way, is because that's something I
| | 05:47 | find I put on every site that I ever create.
| | 05:50 | The only reason you wouldn't is if you
have some special reason not to allow
| | 05:53 | people to search the site.
| | 05:55 | Now, I think we're ready to go.
| | 05:57 | The steps you saw just barely touch
on tasks in the Building a Drupal Site
| | 06:01 | section from the Drupal
Essential Training series.
| | 06:04 | If you're hungry for more
detail, refer to that course.
| | Collapse this transcript |
|
|
2. Getting Ready for SalesAccepting PayPal payments| 00:00 | If you listen to rap at all,
you know you've gots to get paid.
| | 00:03 | So before we do anything else, let's look
at how Drupal Commerce handles payments.
| | 00:08 | I'll first show you how its example
payment system works; that lets you test
| | 00:11 | your store without involving any real money.
| | 00:14 | Then I'll show you how to hook
up your store to a PayPal account.
| | 00:17 | To get started, we click
Configure store, and Payment methods.
| | 00:21 | Then let's go down to
Example payment, and edit it.
| | 00:26 | This page will become extremely
familiar to you as you use Drupal Commerce.
| | 00:31 | This is the interface for a Drupal
module called Rules, which comes with
| | 00:34 | the Commerce Kickstart.
| | 00:36 | Basically, Rules comprises three parts.
| | 00:39 | This part at the top, Events, is
what sets the rule in motion.
| | 00:43 | In this case, it happens whenever a customer
selects a payment method from a pop-up menu.
| | 00:48 | The Condition section tells you what has
to be true for the action to take place.
| | 00:52 | For example, you could decide to
accept PayPal payments up to only a
| | 00:57 | certain dollar amount.
| | 00:58 | If the order is bigger than that,
the action simply won't fire.
| | 01:02 | This payment has no conditions.
| | 01:03 | Customers can use it for all orders.
| | 01:06 | Finally, Actions tells you what is
actually going to happen when that event occurs.
| | 01:11 | In this case, it's simply to allow
customers to use this payment type.
| | 01:15 | We will talk more about rules in
the video about understanding rules.
| | 01:19 | If you want to, you can read a lot
more about it at drupal.org/project/rules.
| | 01:26 |
| | 01:27 | But, for now, we have no changes to make.
| | 01:29 | So we will just get out of
here by closing this overlay.
| | 01:33 | Now, let's let customers pay using
PayPal, which is one of the most popular
| | 01:37 | methods of payment on the internet.
| | 01:39 | To accept such payments, you have
to get an account at paypal.com, and
| | 01:43 | specifically it's at developer.paypal.com.
| | 01:48 | I won't go into the details.
| | 01:50 | For that, see the lynda.com series
eBay for Sellers Essential Training.
| | 01:54 | I already created an account:
lyndaaccounttest@yahoo.com.
| | 01:59 | We are going to have to have that
when we go to configure the module.
| | 02:03 | But Drupal Commerce Kickstart
doesn't come with that module preloaded.
| | 02:07 | We are going to have to get it from drupal.org.
| | 02:09 | You can do so by going to
drupal.org/project/commerce_paypal.
| | 02:19 | From there, you scroll down to the
version that you want to install.
| | 02:22 | At the time that I'm recording this,
it's still in Development version.
| | 02:24 | I know that it works, because I've
tried it, but of course, you're going to want
| | 02:27 | to use whatever is the most stable
version available at the time you see this.
| | 02:31 | You will right-click, or Command+Click,
in order to copy this link location, and
| | 02:35 | then you will install this as
you do any other Drupal module.
| | 02:38 | For more information on that, you
can see my lynda.com course, Drupal
| | 02:42 | Essential Training.
| | 02:43 | But we will just go up here in Modules
>Install new module, and paste the URL
| | 02:49 | that we just copied.
| | 02:50 | This is the way that you install all modules.
| | 02:52 | Click Install, and then we will enable it
by clicking Enable newly added modules.
| | 02:59 | Once again, we close up these groups,
so that we get down to our Commerce group,
| | 03:03 | and then we look for our PayPal module.
| | 03:05 | There is our payment method example,
and payment, which are already enabled,
| | 03:08 | because they come with Commerce
Kickstart, and here's our PayPal modules.
| | 03:12 | We are going to use PayPal, and WPS.
| | 03:15 | There is also a Payments
Pro that we won't get into.
| | 03:18 | Scroll down to the
bottom, and save configuration.
| | 03:22 | Once that's done, we can actually
go and configure that payment method.
| | 03:27 | Once again, we go back up to Configure
store where we were before, and Payment methods.
| | 03:31 | Now we see an extra
choice down here: PayPal WPS.
| | 03:36 | We enable it by going over to
the Enable link, and clicking it.
| | 03:39 | Then make sure we want to; yes, we do.
| | 03:42 | It's now almost ready to use, but we
still have to edit it to put in our
| | 03:46 | PayPal information.
| | 03:47 | So we click Edit, and down to our
Actions, which we have to edit, and there is
| | 03:53 | the spot we put in our PayPal e-mail address.
| | 04:00 | Scroll to the bottom, and click Save.
| | 04:06 | Now, I do want to mention a few of those
other options that we skimmed over there.
| | 04:09 | I'll click Edit, and take another look.
| | 04:12 | First is the choice between Sandbox and Live.
| | 04:15 | By default, you're not actually
going to start accepting payments.
| | 04:19 | Instead, it's going to be a way that
you can test accepting payments without
| | 04:22 | transacting any real money.
| | 04:24 | When you're ready to switch over,
you will change it to Live, of course.
| | 04:28 | Then there are some other options at the
bottom, which aren't as important for our purposes,
| | 04:31 | so we'll just click Save.
| | 04:35 | So we now have two payment methods,
which we can see once again by going to
| | 04:38 | Configure store, and Payment methods.
| | 04:41 | We have the Example payment,
and PayPal WPS.
| | 04:45 | These show up when somebody buys a product
from our site, and then tries to pay for them.
| | 04:49 | Since we don't have any products yet,
we can't demonstrate payment methods.
| | 04:53 | But you will see how that works after
we start adding some products to our site.
| | 04:56 | We are now ready to start accepting
customer's money, at least through PayPal,
| | 05:02 | but customers still don't
have a reason to pay us.
| | 05:05 | So the next step is to start
listing some products in our store.
| | Collapse this transcript |
| Setting up individual products| 00:00 | When we're done with the next two
videos, which show you how to create both a
| | 00:03 | product, and a product display,
you will see something like this.
| | 00:07 | It's the front page of our site, with the
product itself showing up in a list of other products.
| | 00:12 | It has an image of the product, a
description of the product, but it also has
| | 00:15 | such nice little things,
like this Add to Cart button.
| | 00:19 | When you click on the product itself,
you see it with a larger image, and a
| | 00:23 | little bit of other changes, which you can
affect in the product display. Let's get started.
| | 00:29 | Now, it's time to list our first product.
| | 00:32 | Our client in these videos is a
company that produces olive oil,
| | 00:35 | so we will sell a simple half liter bottle.
| | 00:38 | Later, we will sell a variety of
sizes, and flavors, along with cosmetics, and
| | 00:42 | tickets to events in the Olive
Grove, and so on, but let's start small.
| | 00:46 | Now, when we're done with this first
video, you won't see the product on your
| | 00:50 | site, because Drupal Commerce
separates product entry, which we're doing now,
| | 00:54 | from product display.
| | 00:55 | I'll show you about the latter in
the next video, displaying products.
| | 00:59 | The basic way that you add
products is actually fairly simple.
| | 01:03 | You go up to View products,
and click Add a product.
| | 01:06 | Once there, you see that
there are a few required fields.
| | 01:09 | You have to enter a unique identifier --
| | 01:11 | I'm going to be using five digit
codes throughout this video series --
| | 01:15 | a title, a price, and a status, and
you can also add an image if you like.
| | 01:20 | This pattern is based on what's called
a product type, and if you're familiar
| | 01:24 | with Drupal 7, you know that
this is something called an entity.
| | 01:27 | It's a lot like creating
a content type for nodes.
| | 01:30 | I will show you just very quickly
how that works, in case you're not
| | 01:33 | familiar with Drupal 7.
| | 01:35 | Go up to Store, and Products,
and then click Product Types.
| | 01:39 | We only have one, which has a number
of fields in it, which we can see by
| | 01:43 | clicking Manage Fields. There it is;
| | 01:46 | the SKU, the Title, Image, Price, Status;
these are the fields you just saw a minute ago.
| | 01:50 | You can make changes to these fields by
clicking on Edit next to the field itself.
| | 01:55 | Let's put in a default image, so that
if we don't have an image of the product,
| | 01:59 | people will see something,
instead of just a blank space.
| | 02:02 | To do that, you scroll down to the
area where you can add that -- this default
| | 02:05 | image down here -- and click Choose File.
| | 02:08 | We have a default image in the exercise files;
| | 02:10 | this one right here.
| | 02:11 | So I will choose it, and open,
and Save settings.
| | 02:16 | Then, we close our Overlay,
if we'd like.
| | 02:18 | You will see how this affects our
store as we go on throughout the course.
| | 02:22 | Now let's go back,
and actually add a product.
| | 02:24 | Once again, we go up to Store, and
Products, or we could simply click View
| | 02:28 | Products in the shortcut bar here.
| | 02:30 | But however we get there,
we then click Add a product.
| | 02:33 | I will make this 10001.
| | 02:37 | The Title is Olive Oil, .5 liter.
| | 02:42 | In this case, I do have an
image in my exercise file,
| | 02:44 | so I will select that, and let's say
it's $10.00, and scroll to the bottom, and Save.
| | 02:51 | If you're building a full catalog,
here you have an option to add another
| | 02:54 | immediately, but we will
just add this one for now.
| | 02:58 | That's pretty much all there is to it.
| | 02:59 | Now, these products, as I say, do not
show up on the site yet. They're sort of
| | 03:03 | like boxes of things in the warehouse.
| | 03:06 | On your Drupal Commerce Web site, you
have to move them into the retail store, so
| | 03:10 | to speak, before anyone can buy them.
| | 03:13 | So the next thing we'll do is to
create a way to display this product.
| | Collapse this transcript |
| Displaying products| 00:00 | We've set up our store, and added
one product; a bottle of olive oil.
| | 00:04 | The way Drupal Commerce works, that's
only the first half of the equation.
| | 00:09 | That product won't appear on our site
until we also display the product, sort of
| | 00:13 | like moving items from the
warehouse to the front of the store.
| | 00:17 | To do that, we will create something
called a product display node. Because we
| | 00:21 | are using Commerce Kickstart, we get a
few things that you'll have to set up by
| | 00:24 | hand if you installed it from scratch.
| | 00:26 | The first is in the modules. You will
have to turn on two modules that are down
| | 00:30 | here under the Commerce area.
| | 00:33 | First is Cart, and
second is Product Reference.
| | 00:37 | You'll need Product Reference, because
that's what ties together the products
| | 00:41 | with the product displays.
| | 00:43 | Another thing that we get from
installing from the Kickstart is a product
| | 00:46 | display node content type.
| | 00:48 | You see that by going up to Structure, and
Content Types, and there is Product Display.
| | 00:54 | As with other kinds of nodes in
Drupal, you can change the fields that it
| | 00:57 | contains by going over to Manage Fields,
and as you see, there's only three by default.
| | 01:02 | There is the Title, and the
Body, and then there is a Product.
| | 01:06 | This is, once again, what ties our
display node to the product itself, through
| | 01:10 | a product reference.
| | 01:12 | Now it's time to actually add a product
display. There are two ways to do this.
| | 01:16 | The obvious way is by
clicking Add product display.
| | 01:20 | The other way is the more drupaly one,
by going up to Content, Add content,
| | 01:25 | and Product display.
| | 01:27 | In either case, it gets us to this form.
| | 01:29 | I'm going to fill it out using some
text that in our exercise files, and we'll
| | 01:33 | copy the title here: Our best olive oil.
And also, the body here: this is our
| | 01:41 | description of the product.
| | 01:42 | Now, you'll remember there were three
fields in the product display content type.
| | 01:47 | The third one is right here; the
reference to the product itself.
| | 01:51 | I happen to remember that we called it
olive oil, something, something. So as
| | 01:55 | I start to type it in, it looks through all of
the products and says, oh yes, that's the one.
| | 01:59 | If we had more than one that started
with olive, or that had olive in it, we
| | 02:02 | would see the whole list here.
| | 02:03 | But I will just click this, and
go down, and Save, and there it is.
| | 02:10 | This is the full view of our product.
| | 02:12 | It is also set up, by default, to put
that on the front page of our site, so
| | 02:15 | a catalog starts
compiling, just as we add products.
| | 02:19 | If we click on our logo, and go to the
front page of our site, there it is, and
| | 02:22 | there is even an Add to cart button here.
| | 02:24 | Now the truth is, we could leave things
as they are now, and we would be able to
| | 02:27 | just shop from the site as it is.
| | 02:29 | But I would like to go back and make a
few changes to show you how to affect the
| | 02:33 | way that products are displayed.
| | 02:34 | There are two kinds of changes you can make.
| | 02:37 | One kind affects only the display
of a particular product, and the other one
| | 02:41 | affects the display of all products.
| | 02:44 | First, I am just going to
change this particular product.
| | 02:46 | To do that, you click its title to
go to its full node, and there is this
| | 02:49 | little Edit tab here.
| | 02:52 | Besides the things that we filled out
earlier, if you scroll to the bottom, you
| | 02:55 | will see all of these things,
which are called vertical tabs.
| | 02:59 | We could, for example, add a menu link here,
and have that show up at the top of the page,
| | 03:03 | make different revisions as we change
things throughout the process of building
| | 03:07 | our site, and so on.
| | 03:08 | The one I'm going to change,
though, is this URL path setting.
| | 03:11 | If we switch over to the way that
somebody sees this site as a visitor, which I
| | 03:15 | have in another browser, and reload,
you will notice that we see our product,
| | 03:19 | but when we click it, the URL is this
node/1; it's not really very friendly. And
| | 03:25 | furthermore, that node/1 doesn't say
anything to search engines like Google, or Bing.
| | 03:31 | We can make it more friendly both to
people, and to search engines, by going back
| | 03:35 | to that node here, and
adding what's called a URL alias.
| | 03:39 | I'm going to call this our best olive oil
half liter, let's say, and then Save it.
| | 03:47 | And now if you look at the top of the
page, there it is. Much better for search
| | 03:50 | engines, and it is also more friendly to people.
| | 03:53 | There are other things that you can
change in those vertical tabs, and if you
| | 03:56 | want to learn more, see the
Drupal 7 Essential Training Course.
| | 04:00 | Now I would like to move on to the more
powerful part, which will show you how
| | 04:03 | to change the display of
every product on your site.
| | 04:06 | For example, let's say that you want to
make this graphic bigger, or put a label
| | 04:10 | next to it, and you want it to be
consistent on all the products in your site.
| | 04:13 | You can do that by editing either the
product display, or the product, and it's
| | 04:18 | sometimes not clear which you edit.
| | 04:21 | What I usually do is I start with the
product display, and to do that go up to
| | 04:24 | Structure, and Content Types, and
once again, we have Product display.
| | 04:29 | Now, instead of clicking edit, or
manage fields, I click manage display.
| | 04:34 | So I wanted to change the look of that
image, and I go over here, and I see, ah,
| | 04:38 | wait a second; I have to change that on
the product itself. But there are some
| | 04:42 | things that I change on the node.
| | 04:44 | For example, if I were to show a
label here for the body -- let's do that; I'll
| | 04:49 | put it above, and Save, and
then close out this overlay --
| | 04:54 | we now see this label here that says
Body. I don't really like that, so I will
| | 04:58 | go back, and I will change it by
clicking Structure, Content type, Product display,
| | 05:02 | and manage display, and
just remove it; easy enough.
| | 05:06 | And of course, Save.
| | 05:07 | But let's go ahead and change that image.
| | 05:10 | I can either go to the Product
Manage Display tab, or just click this link
| | 05:14 | here. I'll do that, and then click
manage display, and here I can change the
| | 05:20 | style of that image.
| | 05:23 | Let's say I want to change it from
medium to large, and Update, and Save.
| | 05:29 | Now let's go back and see how that looks.
| | 05:31 | Yup; it immediately refreshed, and
now we see a much bigger picture.
| | 05:36 | Now, I know that Drupal Commerce's two-
step process for listing product is a bit
| | 05:40 | odd, and it's sometimes confusing to
tell whether you're supposed to affect the
| | 05:44 | product, or the product display.
| | 05:47 | The way I handle it is to first
create products, and then create the display
| | 05:51 | nodes that I need to display those products.
| | 05:54 | In fact, you have to go in that order,
because in order to display a product,
| | 05:57 | you first have to have it, and then
make a reference to that product. Then, if
| | 06:02 | I want to change the way these
things look on the site, I start with the
| | 06:05 | product display, because I know
there are links back to the product if I
| | 06:09 | need to make any changes there.
| | 06:12 | So now we have all of our products
displaying on our site, and along the way, I
| | 06:16 | pointed out that we have this
Add to cart button right here.
| | 06:20 | Believe it or not, it's already
possible to start shopping on the site.
| | 06:23 | We will talk about the shopping cart,
and checkout bits, in the video, Seeing
| | 06:27 | your site from a customer's viewpoint.
| | Collapse this transcript |
| Categorizing products| 00:00 | Most product catalogs, whether online,
or in paper, are broken into categories.
| | 00:06 | A department Store catalog will have, for
example, a category for lawn and garden,
| | 00:10 | and another one for housewares, and so on.
| | 00:12 | Drupal Commerce lets you organize
your products into categories as well, but
| | 00:16 | first you have to decide
what those categories are.
| | 00:19 | This video shows you how.
| | 00:21 | The controls for such categories are
under Structure, and Taxonomy, and here I
| | 00:25 | should explain exactly the way Drupal works.
| | 00:28 | The whole system is called its taxonomy.
| | 00:31 | A taxonomy is divided into
vocabularies, and each vocabulary is a
| | 00:35 | different class of category.
| | 00:37 | For example, let's say
that you're selling shirts.
| | 00:40 | You might have one vocabulary for
size, and another for color. Within each
| | 00:44 | vocabulary are terms that
say what the thing actually is.
| | 00:48 | So the size vocabulary would have the
terms small, medium, and large, and the
| | 00:53 | color vocabulary would have red,
and black, and white, and so on.
| | 00:57 | So first, we are going to
have to add a vocabulary.
| | 00:59 | I am going to call this one Category, and we
don't actually have to put in a description.
| | 01:07 | There; it's that easy.
| | 01:08 | Now we will add our terms to that category.
| | 01:11 | To do that, go over and click
add terms, next to Category.
| | 01:15 | The first one I will add is Edible oils,
which fits the product that we already
| | 01:18 | added to our site, so Edible oils.
| | 01:22 | You can add a description,
and I'll do that right now.
| | 01:24 | Let's say, A centerpiece of
good eating, and then a URL alias.
| | 01:31 |
| | 01:32 | I'll add one here, and you will understand
what it does when I'm done with the video.
| | 01:36 | I'll just make it edible-oils, and Save.
| | 01:39 | You'll notice that after you've added a
term, you're asked to add another one.
| | 01:44 | That just follows the way
that people usually work.
| | 01:46 | They'll usually start adding term
after term, which is very convenient I
| | 01:50 | think, so I will actually add
Cosmetics with its own URL alias, and save. And
| | 02:00 | finally, Apparel, and save.
| | 02:07 | Now, we have set up our categories,
but they don't actually show up anywhere
| | 02:11 | until we link them to our product display nodes.
| | 02:14 | So to do that, I go up to Structure, and
Content types, and edit the product
| | 02:20 | display content type.
| | 02:22 | I will go into manage fields. In
order to connect the categories to product
| | 02:27 | display nodes, I am going to add a
field here. I will say, Type of product, and
| | 02:34 | here I will just call it type_of_product.
| | 02:38 | If you have any problems with this
screen, or setting up content types, or
| | 02:42 | managing fields, take a look at my
Drupal Essential Training Course, which goes
| | 02:45 | into this in a lot more detail.
| | 02:48 | For field type we select Term
reference. That refers back to, as I say, those
| | 02:53 | terms within the vocabulary, and
I'll leave it as Select list, and save.
| | 02:58 | We then choose what vocabulary we
want it to be connected to, in this case,
| | 03:01 | Category, which we just created. Save,
and then we have a whole bunch of other
| | 03:06 | settings that we could use.
| | 03:07 | I'm just going to leave it as it is, and save.
| | 03:10 | Now let's go back to our Content. We
have this right here; we could click it, and
| | 03:15 | edit it, but I also want to show you
how you can see a list of all of your
| | 03:18 | product display nodes.
| | 03:19 | You go up to Content and click, and if you had
more than one, it would show up in this list.
| | 03:24 | To edit it, you just go and click edit.
That takes us back to the same place as
| | 03:28 | if we'd clicked edit in that other screen.
| | 03:30 | As we scroll down, we now see this extra
field: Type of product. It's an edible oil,
| | 03:36 | so I will add that, and save.
| | 03:38 | If I go back to look at it, we see we
now have Type of product, Edible oils, and
| | 03:44 | that actually shows up as a link.
| | 03:46 | You will see what that does
after I add a few more products.
| | 03:51 | Now remember, adding
products is a two-step process.
| | 03:54 | We first add the product,
and then the product display.
| | 03:57 | If you're a premium subscriber on lynda
.com, or if you receive this course on
| | 04:01 | the disk, you can use the text and graphics
in the exercise files, as I'm going to do.
| | 04:06 | If not, or you're building your own store,
of course, you can use any content you like.
| | 04:10 | Rather than show you the whole
process of adding products, and product
| | 04:13 | display nodes, I am going to go ahead
and add them myself, and we will come
| | 04:17 | back when we're done.
| | 04:19 | There; we now have three products in our site.
| | 04:22 | We have our original
olive oil here at the bottom;
| | 04:24 | we also have some Lemon-
flavored olive oil, and also Lip balm.
| | 04:28 | Now, if we click on one of these two
edible oils, we see that link I showed you
| | 04:33 | before, Edible oils, and if you click on
that link now, you'll see that it takes
| | 04:37 | you to a page that shows you all
of the edible oils on our site.
| | 04:41 | If I were to go back to the front
page and click on Lip balm, it's in the
| | 04:47 | Cosmetics group, and of course, there's
only one in the site, but if there were
| | 04:50 | more, it would show up here.
| | 04:52 | You'll also notice that our
URL says cosmetics up here.
| | 04:55 | Once again, that's good not only for
people who are visiting the site, but
| | 04:58 | also for search engines.
| | 05:00 | So that's as an introduction to
categories, and remember, we did that all
| | 05:04 | through the Taxonomy page
under Structure, and Taxonomy.
| | 05:07 | There is a lot more to
Categories, we didn't go into, such as
| | 05:11 | creating subcategories.
| | 05:13 | I do have a recommendation though:
plan your taxonomy well from the beginning,
| | 05:18 | and then keep tabs on it as you add
products. It's easy to change direction in
| | 05:22 | midstream, and forget to re-categorize
things, but a store that's well organized,
| | 05:27 | with thoughtful categories, is a
cinch to manage, and a joy to shop.
| | Collapse this transcript |
| Adding simple taxes| 00:01 | If you have been following the course
to this point, you could actually open
| | 00:04 | your store right now.
| | 00:06 | You know how to create and display products.
| | 00:09 | We have categorized them, and you
have given customers a way to pay.
| | 00:12 | But there's a lot more to running
an online store than that, of course.
| | 00:16 | In this jumpstart Section, I am just
touching on a few topics that give you a
| | 00:20 | foundation for all the rest of the
things you will learn in this course.
| | 00:23 | This video shows you how to apply a very
simple tax to your customer's orders.
| | 00:27 | But in a larger sense, it's about
two features that are central to Drupal
| | 00:31 | Commerce, and that you will learn
more about throughout the course;
| | 00:34 | line items, and rules. But let's take it
back a little bit, and talk just about taxes.
| | 00:40 | We go up to Store, Configuration, and Taxes.
| | 00:45 | Here we have two tabs: Tax Rates, and Tax Types.
| | 00:49 | You might notice a pattern between
this screen, and some of the others you've
| | 00:53 | seen during this course.
| | 00:55 | You might remember, setting up a content type,
| | 00:58 | and a content type is a pattern for nodes.
| | 01:01 | You create the nodes themselves based on a
content type, because as I say, it's the template.
| | 01:06 | Product display is the only
content type we have used in this course,
| | 01:09 | although Drupal, and Drupal Commerce
as well, also comes with two others,
| | 01:12 | known as basic pages, and stories.
| | 01:16 | Similar to content types, are product types.
| | 01:18 | A product type is a pattern for products.
| | 01:21 | So first you create the
product type, and then you create the
| | 01:23 | products themselves.
| | 01:25 | Drupal Commerce comes with
one product type built in.
| | 01:28 | Now we are in taxes, and we have tax
types. They are patterns that we use to
| | 01:33 | create the taxes themselves.
| | 01:35 | So let's go back to our site, and
| | 01:36 | I will show you how that works.
| | 01:39 | Drupal Commerce comes with two tax types.
| | 01:41 | First there's the Sales tax, which is
the way that we do things in United States,
| | 01:45 | and several other countries.
| | 01:46 | Then there is VAT, which is
more of a European system.
| | 01:50 | The difference between the two has to
do with when the tax is applied, and there
| | 01:54 | are few other small differences.
| | 01:55 | Now the Tax Rates tab, actually defines
how much tax there is of those two types.
| | 02:01 | So let's go ahead and add one.
| | 02:03 | We click Add a tax rate,
| | 02:04 | and I am going to call this Flat 8% tax.
| | 02:11 | The display title will also be Flat 8% tax,
and if you want you can add a description.
| | 02:17 | In the Rate, we actually enter this
as a decimal; 8% is 8 one hundredths.
| | 02:22 | You are adding 8 one hundredths of the
amount of the sale, so it's dot, 0, 8; .08.
| | 02:28 | And we are going to keep it as a Sales tax.
| | 02:30 | This is where that tax type
comes in, and Save tax rate.
| | 02:36 | That's really all that you have to
do, except I want to mention exactly
| | 02:39 | what's happening here.
| | 02:40 | When you create a tax rate,
you're actually creating a rule,
| | 02:44 | and if we click configure component here,
you'll see a little bit about how that works.
| | 02:49 | You could set up conditions here, so
for example, only apply the tax if
| | 02:52 | it's within a certain state, or if it's above
a certain amount, or below a certain amount.
| | 02:56 | And then it takes an action.
| | 02:58 | And if we edit that, you
can see it's our Flat 8% tax.
| | 03:02 | I will show you a bit more about how to
vary your taxes according to location in
| | 03:08 | the video creating tax rules.
| | 03:10 | But for a simple tax,
that's really all you need to do.
| | 03:13 | But where does the tax show up?
| | 03:15 | Drupal Commerce is set by default to
display taxes American-style; during the
| | 03:20 | checkout phase of the purchase. So I will
walk through the process to demonstrate that.
| | 03:24 | We will also catch anything odd we
might've missed while setting this up.
| | 03:28 | To do that, I will close out this
overlay, go back to my front page, and let's
| | 03:32 | say that I want to, for the first
time in this course, purchase something.
| | 03:35 | I will purchase this Lip
balm; add it to the cart.
| | 03:39 | That shows up over here. I'll view the cart.
| | 03:43 | Yep, it's 8 dollars.
| | 03:44 | And then let's say I check out.
| | 03:45 | Yep, there is our 8 dollars for the item.
| | 03:48 | We only have one item, so there's
our subtotal of 8 dollars, and then it adds
| | 03:52 | the 8% tax, for $8.64.
| | 03:55 | These parts are what are known as line items.
| | 03:58 | The product here is one kind of line
item, and then the tax is an item that is
| | 04:02 | added after all of the
products are put together.
| | 04:05 | Some of this behavior varies in Drupal
Commerce, and the good thing about Drupal
| | 04:08 | Commerce is that you can make it vary
according to your individual situation.
| | 04:12 | And taxation is a kind of place where
you might actually end up varying the
| | 04:16 | way that things appear.
| | 04:17 | It's a very complex subject, and we only
scratch the surface with this simple tax example.
| | 04:22 | But in Drupal Commerce, all of this
implementation happens using rules.
| | 04:27 | I will show you how to use rules to
prevent people in your home state from
| | 04:29 | paying taxes, for example, in the video
understanding rules, and you can add any
| | 04:34 | kind of rule you want to create any
kind of tax situation that you need.
| | Collapse this transcript |
| Seeing your site from the customer's viewpoint| 00:00 | Our store is simple, but ready for customers,
| | 00:03 | but you should never launch a site
until you have walked a mile in your
| | 00:06 | customers shoes, so to speak.
| | 00:08 | In this case, that means we have to
actually go through the process of
| | 00:11 | ordering something.
| | 00:13 | To do that, I'm going to switch to
another browser where I am not logged in
| | 00:16 | so we can see the site exactly
as everybody else will see it.
| | 00:19 | I will switch over to the Firefox
browser, where as you can see from this User
| | 00:24 | login block, I'm not logged in.
| | 00:26 | I'm also logged in to our
fictitious user's e-mail account right here.
| | 00:31 | Now let's pretend that I'm an ordinary
customer buying a product from the site.
| | 00:35 | So I will go down, and I will add something here,
| | 00:37 | I will add something else here, and
as I go through, you'll notice that the
| | 00:42 | Shopping cart starts to fill up.
| | 00:44 | I could look at the cart.
Okay good; two items.
| | 00:46 | I could actually make this 2 of the Lip
balm instead of one, and say Update cart.
| | 00:51 | Great; $26.00, and then I go to the Checkout.
| | 00:55 | Terrific; so far it works perfectly.
| | 00:57 | I have my items, I have
the tax, and I have the total.
| | 01:00 | I am going to add little bit
of account information here.
| | 01:03 | Here, I will put the e-mail address of
the purchaser, and I will make up a name,
| | 01:14 | and an address, and finally, continue on.
| | 01:23 | It's asks us to confirm all of this
information. Yup, looks good to me, and then
| | 01:29 | down at the bottom you have a
choice of what payment method to use.
| | 01:32 | You will notice that when I change
from one payment method to another, it
| | 01:35 | changes the parts of the
form that you have to fill in.
| | 01:37 | The example payment just has this little
test area where it will fail for single
| | 01:42 | character value, so I will just enter
something here: test, so I know that it will
| | 01:45 | go through. Continue on, and there we are.
| | 01:49 | Once we have completed our order, we
see that as this user, we can view the
| | 01:53 | order, and see exactly what we ordered.
| | 01:55 | Some other things are happening, though.
If we switch over to the purchaser's
| | 01:58 | e-mail box, they've received some e-mails.
| | 02:01 | Now remember, they have never been to
the store before, so the first thing that
| | 02:04 | happens is that the store
creates an account on the site,
| | 02:08 | and it tells them how to log in, and so on.
| | 02:11 | The other e-mail message that we got
tells us a little bit more about that order,
| | 02:15 | and it tells us how we could go
in and take a look at that order.
| | 02:18 | If we go back to our site as the
administrator, and click People, there! We see
| | 02:23 | that person right here.
| | 02:24 | And it says that they have never been
to the site; that's because they have
| | 02:27 | never actually logged in to the site.
| | 02:29 | So each person who makes an order from
your site actually becomes a user as well.
| | 02:34 | That's good because it gives you a
way of presenting their information in
| | 02:37 | a collected format.
| | 02:38 | They can log in, and look at all of their
orders, the entire order history, and so on.
| | 02:44 | The other good thing about this is that
you can create a community in that way,
| | 02:48 | which ties in with the orders that people make.
| | 02:51 | If they want to talk about their
orders, they have a persistent personality on
| | 02:54 | your site as a result.
| | 02:56 | You can also configure your site so
that different people get e-mails whenever
| | 02:59 | somebody makes an order; so the person who
has to ship it, and wrap it up, and so forth.
| | 03:04 | But we will get into those
parts later on in the course.
| | 03:07 | That's a pretty satisfying procedure, isn't it?
| | 03:09 | The way that somebody went through and
actually made a purchase looks a lot
| | 03:13 | like any other store that you see on the
Internet, including those that are much,
| | 03:16 | much bigger than the sites that
you and I will probably build.
| | 03:19 | Now we are going to go back behind
the scenes, and see what happens on the
| | 03:23 | administrator's side when an order comes in.
| | Collapse this transcript |
| Processing orders| 00:00 | So, someone finally bought
something from your store. All right!
| | 00:04 | Now you just have to fulfill the order.
| | 00:07 | If you have run any sort of mail-order
operation before, you know that there is
| | 00:10 | more to it than just tossing
something in an envelope, and sending it off.
| | 00:13 | You also need to check
the order, and the payment,
| | 00:16 | add the customer's information to your
records, and change the order's status from
| | 00:20 | pending, to completed.
| | 00:22 | Fortunately, the folks who created Drupal
Commerce are well familiar with these procedures,
| | 00:26 | and they made the software act
according to familiar real-world patterns.
| | 00:31 | First of all, Drupal Commerce assumes
that you are going to check the site
| | 00:34 | for orders frequently.
| | 00:35 | You can set it up so you get an e-mail
whenever an order comes in, and I'll show
| | 00:38 | you how to do that in the
video managing orders,
| | 00:41 | but for now, let's just take a
look at the orders that we have.
| | 00:44 | We go up to Store, and Orders, and there's a list.
| | 00:48 | In the last video, we had one order
come in, and we can take a look at it by
| | 00:51 | clicking on its number here, or on the
view link right here, and there it is.
| | 00:57 | It tells us what they ordered, how many
of them, what the tax was, and so on, and
| | 01:02 | also the address that it was sent to.
| | 01:04 | We can edit it if somebody, for
example, makes an order, and then calls up and
| | 01:07 | says, you know what? I really meant to
buy three of those; not two. We will just
| | 01:11 | go over, and change it to three.
| | 01:13 | Scroll down, and save the order.
| | 01:17 | And of course, that updates
all of the related information.
| | 01:21 | You might have noticed that as we
scroll down, there is actually a lot of things
| | 01:24 | that you can change.
| | 01:25 | The user information, who created
it, and you can also change when it
| | 01:29 | was ostensibly created.
| | 01:30 | Let's go back to this part.
| | 01:32 | We are going to change it
from Pending, to Completed.
| | 01:36 | And then we could add a log message here
saying, Sent out the product, or whatever.
| | 01:41 | And down to save.
| | 01:42 | We are also able to take a look
at the payment that they made,
| | 01:47 | so we could see how they paid
for each one of their orders.
| | 01:50 | And if they didn't make a complete
payment, we could actually add another one
| | 01:53 | here. Let's say they made a partial payment,
and they're going to send the money in later on;
| | 01:57 | Drupal Commerce takes care of that.
| | 01:59 | There is one other thing.
| | 02:00 | The way that Drupal Commerce keeps
track of all of this is, every time somebody
| | 02:04 | makes an order on your site, it creates a user.
| | 02:08 | And you can see that by going to People,
and there is a list of all of the users.
| | 02:12 | The one down here at the bottom, admin,
is us; the people who created the site.
| | 02:17 | And then here's the customer
who actually made the order.
| | 02:20 | If we click on that person's name or
e-mail address, we could then go through and
| | 02:24 | take a look at all of the orders of a
specific customer, and make some changes to
| | 02:28 | their individual information.
| | 02:30 | This video finishes the jump
start to sales section of the course,
| | 02:34 | and you could get started right away
with the knowledge that you have, and be
| | 02:38 | happily selling your product tomorrow.
| | 02:40 | If you do that, though, you'll probably need
to add functionality to your store pretty soon.
| | 02:45 | You'd want to give your customers
more options, and get more sales, and ease your
| | 02:49 | administrative load.
| | 02:50 | So keep watching, and we are going to
take your store from basically okay, to
| | 02:54 | something that really works well.
| | Collapse this transcript |
|
|
3. Understanding How Drupal Commerce WorksUnderstanding products and other entities| 00:00 | One thing that a content
management system like Drupal does is to
| | 00:03 | compartmentalize your site's structure
into logical patterns of information that
| | 00:07 | are easy to work with.
| | 00:09 | Drupal calls these entities.
| | 00:11 | Now, describing entities can get a
little bit confusing, and even metaphysical at
| | 00:15 | times, but if you listen through it, you
will find that you may understand your
| | 00:19 | site's structure much better.
| | 00:22 | In core Drupal, there are four kinds
of entities: content, which Drupal calls
| | 00:27 | nodes, users, categories, which
Drupal calls taxonomies, and comments.
| | 00:37 | Let's just take a look at a node.
| | 00:39 | By default, nodes have only
two fields, a title, and a body.
| | 00:44 | But when they're displayed, a node
actually pulls in parts of other entities.
| | 00:48 | For example, the name that gets connected
with that node comes from the user entity.
| | 00:54 | There may be tags at the bottom of
that node; that comes from the taxonomy.
| | 00:59 | And finally, Drupal allows people to
comment on nodes, and those come from a
| | 01:03 | different sort of data
store; the comments entities.
| | 01:06 | If you've used Drupal 7 before,
this is all old-hat.
| | 01:09 | You can add fields to any kind of
entity, and then reference them from
| | 01:13 | other entity types.
| | 01:14 | For example, you could add a picture to
a person's profile, and then that could
| | 01:18 | show up in the node.
| | 01:19 | But back to Drupal Commerce.
| | 01:22 | It adds several more entities.
| | 01:27 | Besides the four that are in core
Drupal, it also adds products, customer
| | 01:33 | profiles, line items, and payment transactions.
| | 01:39 | And most of these work pretty much
the same as they do in core Drupal.
| | 01:42 | If I switch back to our
site, I will show you that.
| | 01:45 | First, let's look at core Drupal.
| | 01:47 | If we go up to Structure, and Content
types, and then take a look at Product display,
| | 01:52 | we can change the fields that go into
Product display pretty easily, and you have
| | 01:55 | seen this already in this course.
| | 01:57 | Similarly, if we go up to Store,
and Products, we have Product Types.
| | 02:02 | And once again, we can add fields to those.
| | 02:05 | As we go on, we can configure our
store, and look at our Order settings, and
| | 02:09 | actually add fields to orders.
| | 02:11 | So when somebody goes through the whole
order process, you could make them for
| | 02:14 | example, add additional information.
| | 02:17 | Let's say their age, if it's some sort of
age restricted item that you are selling.
| | 02:21 | These types -- content types, product
types, and so forth -- are like templates.
| | 02:26 | So if you're selling shirts, you
create a product type that includes an image,
| | 02:29 | and a field for color, and a field for
size, or you might do that all through
| | 02:32 | taxonomy, but once again, you are
just adding fields to entities.
| | 02:36 | And, as I mentioned earlier, Drupal
Commerce often references one entity's field
| | 02:41 | from another entity.
| | 02:42 | That's why you are able to see product
information in your product display nodes.
| | 02:46 | And your product display nodes can also
reference the person who created them, and so forth.
| | 02:51 | I know this is pretty conceptual stuff,
but it will all become clearer the more
| | 02:55 | that you work with Drupal Commerce,
| | 02:57 | and having this understanding will
help you to avoid becoming confused as you
| | 03:01 | go forward.
| | Collapse this transcript |
| Understanding line items| 00:00 | When you go into a store to buy
something, you are product-centric.
| | 00:04 | You are looking for a particular
thing, and you don't care much about what
| | 00:06 | happens behind the scene, but when
you're running the store, you start looking
| | 00:10 | at the bigger picture.
| | 00:12 | The thing that you sell is part of an order,
| | 00:14 | and that order has to be tracked in inventory.
| | 00:17 | Line items are an important part
of the order and inventory system.
| | 00:20 | Here is how it works.
| | 00:24 | An order comprises a list of
products that the customer has purchased.
| | 00:28 | You see those here as Product 1 and Product 2.
| | 00:31 | Those each have a price, and for each one
of those, the customer can buy a number
| | 00:35 | of them: the quantity.
| | 00:36 | The price gets multiplied by the quantity,
and you get the total amount for that product.
| | 00:40 | Products can also have a negative price.
| | 00:42 | For example, if you give a refund, shown
here as -$5. Or they could have no price at all
| | 00:48 | if it's a gift, or some other kind of
giveaway. All of those items add up to a
| | 00:52 | subtotal, and then you put on
additional charges, such as shipping and tax.
| | 00:56 | The things that are at the top of the
screen here, before you add the shipping,
| | 00:59 | and tax, and other additional
charges, are known as line items.
| | 01:03 | The things that come after the
subtotal are not line items; in this
| | 01:07 | case, shipping, and tax.
| | 01:10 | However, orders don't have
to work exactly this way.
| | 01:13 | Here is another example.
| | 01:15 | We have all of our products at
the top, and they are line items.
| | 01:19 | But then again, we also have
the shipping item as a line item.
| | 01:24 | This would be the case if it
was flat rate shipping, for example.
| | 01:26 | We know that no matter
what, it's going to cost 6 dollars.
| | 01:30 | In some order systems, the amount of
shipping changes depending on the total of
| | 01:34 | the line items, and in that case,
shipping itself is not considered a line item,
| | 01:37 | because it's variable.
| | 01:39 | Tax, however, is not considered a
line item in this example, because it is
| | 01:43 | variable; it's a percentage based on
the total amount of the line items before.
| | 01:48 | You will also notice that not
every line item is necessarily taxable.
| | 01:52 | We have added up the amounts of the order, and
that comes to $40; 10% of that is our $4 tax.
| | 01:58 | We didn't charge tax on the shipping.
| | 02:00 | Now let's take a look at how line
items work in a Drupal Commerce store.
| | 02:04 | Since we haven't set up any shipping methods
yet, our order is going to be very simple.
| | 02:07 | We will start by putting an item in the cart.
| | 02:09 | Let's just get us some Lip balm,
and go and take a look at the cart.
| | 02:14 | When we look at the cart,
we see only the line items.
| | 02:17 | We have created a tax rule in a previous video,
but we don't see it here until we go to Checkout.
| | 02:23 | Now we see our line items, and
then we have our tax after it.
| | 02:27 | Now, line items are unusual in Drupal
Commerce in that you can't create them.
| | 02:31 | They are, instead, created by modules
that you install, such as the commerce
| | 02:35 | shipping module I will
show you later in the course.
| | 02:37 | I'll show you what I mean.
| | 02:39 | If we go up to Store, Configuration, and
Taxes, we see that Tax Rate that we added
| | 02:45 | earlier, and in fact, there is
a link here to add a tax rate.
| | 02:49 | However, Drupal Commerce also keeps
track of all of the line items, and if we go
| | 02:53 | back up to Configure store here, and
then down to Line item types. However, we
| | 02:57 | don't have an add link up here.
| | 02:59 | Instead, these line item types appear
as you add modules, or enable modules, in
| | 03:04 | your Drupal Commerce store.
| | 03:06 | As Drupal Commerce matures, I expect
we'll see some interesting definitions of
| | 03:09 | what line items are.
| | 03:11 | As always, drupalcommerce.org
is where you can find out about
| | 03:14 | these developments.
| | Collapse this transcript |
| Understanding rules| 00:00 | Part of Drupal Commerce Kickstart is
a Drupal Module called Rules, which is
| | 00:04 | available separately at
drupal.org/project/rules.
| | 00:09 | A lot of Drupal Commerce's
functioning depends on the Rules module.
| | 00:13 | For example, it comes with a rule that
sends the customer an e-mail message when
| | 00:16 | checkout is completed.
| | 00:18 | You'll see rules a lot as
we go through the course.
| | 00:20 | I want to just take a moment now to
show you how the module works in general.
| | 00:25 | Now, unless you're experienced with
Drupal administration, you'll mostly only
| | 00:28 | deal with rules as you configure your store.
| | 00:30 | They show up in several places.
| | 00:32 | One of them is related to
something we already started playing with;
| | 00:35 | taxes, and we can see that by going
up to Store, Configuration, and Taxes.
| | 00:42 | Here's our Flat 8% tax we created earlier.
| | 00:44 | Let's click edit, and take a closer look at it.
| | 00:47 | This is fairly simple.
| | 00:48 | You get to define the rate, and
what type of tax it is, as we described.
| | 00:52 | But if we go back a screen, and then
click configure component, we see some of
| | 00:57 | the inner workings, which
are a little more complicated.
| | 01:00 | This is where you can add conditions.
| | 01:02 | Let's take a common one.
| | 01:04 | Let's say that our store is in Ohio,
and U.S. tax laws say that we only have to
| | 01:08 | collect state sales taxes for sales that
are shipped to addresses within that state.
| | 01:12 | So we only want to apply the sales
tax when an order is being sent to an
| | 01:16 | address that's inside Ohio.
| | 01:18 | If we look here, we see that
there's a Condition section.
| | 01:21 | This is where we're going to add the
condition to check to see if it's in Ohio.
| | 01:24 | Most rules also have a section up here;
| | 01:27 | Events, and we'll get to that a little
bit later. And as I said earlier in the
| | 01:30 | course, actions defines exactly what
happens when the conditions are met.
| | 01:33 | For now, we'll just click Add
condition, and the condition we are going to add
| | 01:37 | will be an address component comparison.
| | 01:40 | This Data selector area is quite complicated;
| | 01:43 | there is a few different
ways that you can do this.
| | 01:45 | You can type things in, you can choose
them from a list, and if you click and
| | 01:48 | open this Data Selectors, it shows
you all of the different options.
| | 01:51 | If you want more information about how
all of this works, I would suggest that
| | 01:55 | you take a look at the Rules
documentation, which again, you can get to at
| | 01:57 | drupal.org/project/rules.
| | 02:01 | But going down, let's take a
look at what our values are.
| | 02:03 | We are going to take the billing
information, it will be the state or province,
| | 02:11 | and the value has to equal Ohio, and then save.
| | 02:15 | Now if we look again, we can see it
describes exactly what we're going for.
| | 02:21 | Now, let's take a look and see if it worked.
| | 02:23 | I'll close out this overlay, and we
already have an item in the shopping cart
| | 02:28 | which I added previously.
| | 02:29 | Take a look at the cart. Okay,
there it is, $8, and let's check out.
| | 02:33 | Now at this point, we're going to add
our address in the billing Information.
| | 02:37 | So Tom Geller, Address 1, let's just say,
1 Main Street, Oberlin, Ohio, 44074.
| | 02:44 | Now, if I did this correctly,
I should be charged tax.
| | 02:50 | Let's continue and see, and indeed I am.
| | 02:53 | There is our 8% sales tax.
| | 02:56 | Let's go back and change that address
to something in New York, in which case it
| | 02:59 | shouldn't actually charge us the tax.
| | 03:01 | So I'll go back and let's say 1
Spencer Street, Mount Kisco, New York,
| | 03:07 | 10549, and continue. Indeed, it worked;
| | 03:16 | we're not charged tax.
| | 03:18 | Now I want to go back a little, and
show you some of the complexities of rules.
| | 03:22 | We won't be able to go into the details,
because there really are a lot of them,
| | 03:26 | but I am hoping that a little more
exposure will help you debug rules that don't
| | 03:30 | do exactly what you expect.
| | 03:32 | To show you that, I'll go up to Store,
Configuration, and Product pricing rules,
| | 03:38 | and let's take a look at our
sales tax calculation here.
| | 03:44 | Now you see that little extra bit
at the top, the Events section, which
| | 03:47 | I mentioned earlier.
| | 03:48 | Here you can change when an event occurs;
when a rule is triggered, so to speak.
| | 03:53 | Let's take a look at that.
| | 03:56 | One example that's sort of outside of
the whole world of taxes is this After
| | 04:00 | adding a product to the cart.
| | 04:02 | You could, for example, ask the person,
would you like this to be gift-wrapped?
| | 04:06 | Pop up a window, or something like that,
each time that they add a product to the cart.
| | 04:10 | Similarly, you could change how and
when Drupal Commerce calculates shipping
| | 04:14 | charges, and anything else
that happens on the site.
| | 04:17 | To see all the rules at once, click
Configuration, and then go down and click
| | 04:24 | Rules, and there's your introduction to rules.
| | 04:29 | If you want to dive deeper,
check out the project's homepage at
| | 04:33 | drupal.org/project/rules.
| | 04:37 | To really understand them, scroll
down, and click Read documentation.
| | 04:42 | That leads to this URL: drupal.org/node/298476.
| | 04:50 | It happens that Rules has a very
active development community, and this
| | 04:53 | project page also has links to a FAQ --
a Frequently Asked Questions page -- and
| | 04:57 | even to a discussion group.
| | 04:59 | Chances are, you won't need this kind of
help when you first set up your store,
| | 05:03 | but it is good to have, and it's a
great example of the strength of the
| | 05:07 | open-source Drupal community.
| | Collapse this transcript |
| Integrating your store into a Drupal site| 00:00 | Up until now, we've only talked about
the commerce functions of your Web site,
| | 00:04 | but when you install Drupal Commerce,
you automatically install Drupal, one of
| | 00:08 | the most popular and well
supported Web site construction kits around.
| | 00:12 | So it makes sense to build out your
store as a full site in Drupal, rather than
| | 00:17 | trying to integrate it with
some other Web site platform.
| | 00:20 | This video shows you some of the
possibilities of Drupal, but it's so big a
| | 00:24 | topic that lynda.com has several
courses just about building sites in Drupal,
| | 00:28 | and of course, I recommend them.
| | 00:31 | But let's start by looking at Drupal
sites that incorporate Drupal Commerce.
| | 00:34 | We find them by going to the
homepage of the project, which is
| | 00:37 | at drupalcommerce.org.
| | 00:40 | Then, we click on Showcase, and I am
just going to pick the first one here; ioby,
| | 00:44 | in our backyard, which is an excellent site.
| | 00:47 | At the top, we see a gallery of
different things that people are doing; things
| | 00:51 | that ioby wants to promote to everybody.
| | 00:54 | Look at individual projects down here,
with these nice little JavaScript pop-ups;
| | 00:58 | gives you a little more information.
| | 01:00 | There's integration with Google Maps,
which leads you to the individual projects,
| | 01:08 | and an About page, and a blog, and so on;
all of the things that you would expect
| | 01:17 | from a fully-functioned site.
| | 01:19 | So how do you make your site this amazing?
| | 01:21 | Well, there are two ways.
| | 01:23 | If you have an existing Drupal 7 site,
you would simply add the Drupal Commerce
| | 01:27 | modules on top of it, and
then start building the store.
| | 01:31 | The way you do that is by going back
to your site, and then clicking Modules.
| | 01:35 | Then you'll install, enable, and configure
all the modules you need in the usual way.
| | 01:41 | This Install new module link is the
key, but for full instructions, see
| | 01:45 | lynda.com's Drupal 7 Essential Training
course. But which modules do you need?
| | 01:50 | The Drupal Commerce page tells you.
| | 01:52 | Let's go back to drupalcommerce.org,
and click Download from drupal.org.
| | 01:58 | This is where you actually get the
software itself, and as you scroll down, you
| | 02:01 | see this requirements list here.
| | 02:03 | There are quite a few of them, but
again, if you know Drupal well, you'll be
| | 02:07 | able to install it and
configure it yourself just fine.
| | 02:10 | And best of all, you can do that
on top of an existing Drupal site.
| | 02:14 | The other way to integrate your store
with a Drupal site is to start with the
| | 02:17 | store, and then add the other site features.
| | 02:21 | That's what we basically have here in
the site that we've been building for
| | 02:24 | Two Trees Olive Oil.
| | 02:25 | So here are some quick ways
to add common Web site features.
| | 02:29 | Let's start with some basic pages.
| | 02:31 | First we go back to our site, and we'll
close out this overlay just to get back
| | 02:34 | to our front page, just to see what
we're doing. And then to add stuff, you go up
| | 02:38 | to Content, and Add content.
| | 02:41 | I am going to create a basic about Page.
| | 02:44 | So I'll use Basic page.
| | 02:45 | There is also an article content
type, which is slightly different, and
| | 02:48 | again, you can see the Drupal 7 Essential
Training course to understand the differences.
| | 02:52 | But for us, we'll just do a basic page.
| | 02:54 | There's a title, and a body, and I am going
to get that information from my exercise file.
| | 02:59 | There's my title; paste it in, and the body.
| | 03:08 | As I scroll down to the bottom,
there are some additional options.
| | 03:10 | I think I will actually create a Menu
link, and the Menu link will be About.
| | 03:15 | I am also going to create a URL path
alias, so that it shows up in the URL bar
| | 03:22 | up here, just as about, and then I'll
save it, and there's our page. And in fact,
| | 03:29 | we have our little tab here,
| | 03:30 | so if we go back to our front page,
we can go to it very easily by just
| | 03:33 | clicking About, and there it is.
| | 03:35 | That's a good start to filling the
site with content that supports the store,
| | 03:39 | but doesn't advertise a specific product.
| | 03:42 | You'd obviously repeat this process many
times as you build and expand your site.
| | 03:46 | So that's how you add content.
| | 03:48 | Now, to make a site like the one you
saw earlier, you'd also need to add some
| | 03:52 | functionality, such as that
map widget, and photo gallery.
| | 03:55 | You do that with modules.
| | 03:57 | Go up and click Modules, and here we see
the modules that are already installed.
| | 04:03 | These are the core modules. You can
close up this group if you want, or open
| | 04:06 | it up to see exactly what's inside
it, and then we see some things that
| | 04:10 | Drupal Commerce installed as part of the
Commerce Kickstart package that we started with.
| | 04:14 | The important part is this Install new
module bit, and if you want to see what
| | 04:18 | modules are available, you can
take a look at this link here;
| | 04:21 | find modules and themes on drupal.org.
| | 04:23 | I am going to open that up in a new
tab to show you how many there are.
| | 04:30 | Take a look; there's almost 9,000 available.
| | 04:33 | Now, that includes some repeats. For
example, it counts twice the ones that are
| | 04:36 | available for Drupal 6, and Drupal 7,
but there are still thousands of them.
| | 04:40 | The first thing you want to do when
you're searching is to filter by compatibility.
| | 04:44 | Since we are using Drupal 7, we
say Drupal 7, and search, and wow!
| | 04:49 | There's still over 2000.
| | 04:51 | The other part of building
up your site is the design.
| | 04:54 | To do that, let's go back to our
Modules page, and you can see that it's also
| | 04:57 | possible to download themes, which are
entirely package designs for Drupal sites.
| | 05:02 | You can do that not only from here,
but also from the Appearance window.
| | 05:07 | Install new theme, let's take a look
at what themes are available, and again,
| | 05:14 | it's very similar to the Modules page.
| | 05:15 | We'll filter by compatibility, and
search, and we see there's over 200 themes,
| | 05:21 | including several which are sort of
base themes that let you do your own
| | 05:25 | custom programming.
| | 05:26 | You can also completely
create your own custom themes.
| | 05:30 | lynda.com has a course on Drupal theming,
| | 05:32 | so check that out if you want to
go beyond these readymade ones.
| | 05:35 | Finally, you might need some custom programming.
| | 05:38 | This is, of course, a little more
difficult, but lynda.com does have courses on
| | 05:42 | CSS, and PHP, and other skills that will help you.
| | 05:45 | One of the interesting things about Drupal is
seeing how people balance its many features.
| | 05:51 | You could have a huge site with only
a single button for donations, which is
| | 05:55 | handled by Drupal Commerce, or you
could have a big catalog, but only a single
| | 05:59 | non-product page, which is pretty
much what our own site is at this point.
| | 06:02 | Creating that balance between
information and products is a big part of what
| | 06:07 | will give your site its personality.
| | Collapse this transcript |
|
|
4. Listing ProductsAdding product variations| 00:00 | We now have three products on our site.
| | 00:03 | Let's review how they got there.
| | 00:05 | We first created the products
themselves based on a product type called
| | 00:08 | product, and if we go up to Store, and click
Products, we see the three products themselves.
| | 00:14 | These are all based on the
product type called product.
| | 00:18 | After we created these products, we
displayed them by creating product display
| | 00:22 | nodes, and we can see those by going
to Content, and there are all of our
| | 00:26 | product display nodes.
| | 00:28 | Creating and displaying product in Drupal
Commerce always happens in those two steps.
| | 00:33 | First you create the product,
then you create a node to display it.
| | 00:37 | It's important to understand this thoroughly,
because now we're going to add a complication.
| | 00:42 | You will notice that two of
these products are very similar;
| | 00:46 | they're both half liter bottles of olive oil.
| | 00:48 | One of them is lemon-
flavored, and the other is plain.
| | 00:52 | They are, in effect, variations on each other.
| | 00:55 | Let's say that we have several
flavors, and several bottle sizes.
| | 00:58 | I am going to show you an easier way
to create a series of product variations
| | 01:02 | that also improves the shopping experience.
| | 01:04 | We will do this in three steps.
| | 01:08 | First, we are going to add a field to
the product itself that describes the
| | 01:12 | variation, and we will call that Flavoring.
| | 01:15 | Second, we will apply that flavoring
to the relevant products, so the plain
| | 01:18 | olive oil will be labeled as plain, and so on.
| | 01:21 | Third, and this is the tricky part,
we are going to create a single product
| | 01:25 | display node that
displays all of those variations,
| | 01:28 | so we won't need to have three
separate display nodes. Instead, the customer
| | 01:32 | will go to them, and select
the flavor that he or she wants.
| | 01:35 | We will start by going back to our product type.
| | 01:38 | To do that, we go up to Store,
Products, and Product Types.
| | 01:43 | Now I am going to add a field to our product.
| | 01:45 | It's going to be called Flavoring, and
that's going to be of the list type,
| | 01:52 | List (text), and it will be a
select list; that's fine.
| | 01:57 | Our options will be Plain,
Lemon, Basil, and Chili.
| | 02:03 | Let's scroll down, and save, and then we
have some additional options as well.
| | 02:08 | For example, I will make the Default
Flavoring Plain, since that's mostly what we
| | 02:12 | are going to be selling.
| | 02:14 | This Attribute Field Setting is a little
bit complex, but you'll see what it does
| | 02:18 | when we start shopping.
| | 02:19 | We do want it to be enabled, however.
| | 02:22 | Go down further, it shows us,
again, our Allowed values, and save.
| | 02:27 | Now you will see what
happens when we add a new product.
| | 02:30 | How about a half liter
bottle of Chili olive oil?
| | 02:33 | I have a graphic and some text that
describes that olive oil in my exercise files.
| | 02:38 | If you received this product on a disk,
or are a premium member of lynda.com, you also
| | 02:42 | have these exercise files.
| | 02:43 | We will do that by going up to Add
product, and then go to the text file that has
| | 02:48 | all of that information.
| | 02:49 | The SKU is going to be 1003, there is
our title, our image, a little alternate
| | 03:03 | text to help with the accessibility, and
for price, let's make that $10. And then
| | 03:12 | here's our new field; Flavoring.
That's going to be Chili, and save product.
| | 03:17 | Before we go on, I want to edit the
other two olive oil bottles: Lemon-flavored
| | 03:21 | olive oil, and the plain olive oil.
| | 03:24 | This is step two that we had.
| | 03:26 | So I will go in and edit. Here is the
Lemon-flavored one; I'll change it to
| | 03:29 | Lemon, and save. And go back to our products,
and edit the plain one, so that it says Plain.
| | 03:39 | Very good!
| | 03:40 | Now as usual, we will add a product
display to show that Chili-flavored
| | 03:43 | olive oil we added.
| | 03:46 | This part works the same as before.
| | 03:48 | We go up to Add product display,
and start entering the information.
| | 03:52 | I have this all in the exercise file.
| | 03:53 | So I open it; so I will copy my
title, and the body text. Scroll down and
| | 04:07 | choose our product -- remember it was
Chili-Flavored olive oil -- it pops up, and
| | 04:11 | say that it's Edible oils.
| | 04:13 | Scroll down and save.
| | 04:14 | There; now when we go back to our front
page, it shows up the same as all of the
| | 04:19 | other products that we have in our store.
| | 04:22 | But that's not where we're going to stop.
| | 04:24 | We now want to have all three of the
different flavored edible oils to show up
| | 04:28 | in one product display node.
| | 04:31 | To do that, we create one product display
node, which will reference multiple products.
| | 04:35 | Before going on, I'm going to make the
selection a little bit easier by going up
| | 04:39 | to Structure, and Content
types, and product display.
| | 04:44 | Now this field here where it references
the product; if we edit it, we see that
| | 04:47 | it's this autocomplete text field.
| | 04:50 | That's actually a little bit harder
to work with, because we don't see what
| | 04:52 | all the products are.
| | 04:54 | I am going to change it to a select list,
| | 04:57 | make it just a little bit
easier on ourselves, and continue.
| | 05:00 | Now let's go back and create that
product display node that includes all of the
| | 05:03 | flavors of olive oil that we have.
| | 05:05 | To do that, go up to Add product display,
say the title is Half-liter bottle of
| | 05:13 | olive oil (plain and flavored).
| | 05:17 | Go back to my exercise file
and copy the description here.
| | 05:20 | I am going to select multiple products.
| | 05:25 | On Windows, you do that by holding
the Control key, and on Mac, you do that by
| | 05:28 | holding the Command key,
| | 05:29 | and just selecting the ones that
you want, so Olive oil, Lemon-flavored,
| | 05:33 | and Chili-flavored.
| | 05:34 | The type is all Edible oils.
| | 05:37 | Scroll down, and save.
| | 05:41 | Now, you will notice it defaults to
Plain as we wanted, and it shows it as $10,
| | 05:46 | but if I change it to Lemon, we
immediately see the different product.
| | 05:51 | Same is true for Chili, and if in fact
we had different prices, it would have
| | 05:54 | changed the price, and any other attributes.
| | 05:57 | This is a wonderful way to create
a single display node that's more
| | 06:00 | convenient for people to shop.
| | 06:02 | The last thing that I'm going to do
is I am going to go back to my list of
| | 06:05 | content, and unpublish the
ones that we don't need anymore.
| | 06:09 | We don't need to have all four nodes;
one of them that holds three, and the other
| | 06:12 | three individual ones. So I will
take Chili-flavored, Lemon-flavored, and
| | 06:16 | ordinary one, and Unpublish it.
| | 06:18 | Now if we go back to our front page, we
have the Half-liter bottle of olive oil,
| | 06:25 | and the Lip balm; much cleaner. Pretty cool, huh?
| | 06:29 | But I know what you're thinking.
| | 06:30 | You are thinking, does this mean we have
to add every variation of our product by
| | 06:34 | hand? And the answer is well, yeah, basically.
| | 06:38 | But there is a module that does that,
and it takes away a lot of the heavy
| | 06:41 | lifting. It's called Commerce Bulk
Product Creation, and you can get it at
| | 06:46 | drupal.org/project/commerce_bpc.
| | 06:53 | If you have trouble installing it, see
the video expanding a site's capabilities
| | 06:57 | with modules in lynda.com
series Drupal 7 Essential Training.
| | Collapse this transcript |
| Managing product variations| 00:00 | In the video where we added product
variations, we made this site easier for
| | 00:04 | shoppers, but in the process, we lost something.
| | 00:08 | You might remember that when we looked
at the Jalapeno Oil, the one with the
| | 00:12 | Chili-flavoring, it used to say
something about how it was spicy and wonderful,
| | 00:16 | but now we just have this generic text
here, no matter what flavor we choose.
| | 00:21 | That's because we have multiple
products sharing one display node.
| | 00:25 | But we can change it back to add a
little bit more information into the product
| | 00:29 | itself, so that we see a combination of
both this generic text, and the individual
| | 00:34 | text for each of the flavors.
| | 00:35 | To do that, we go up to Store, and
Product, and we are going to edit the
| | 00:40 | Product Type itself.
| | 00:41 | We will add a field, which
will be called Flavor notes.
| | 00:49 | That's going to be something called a Long text.
| | 00:52 | Long text allows you to
have multiple rows. And save it.
| | 00:57 |
| | 00:58 | As usual, we are asked for a few options.
| | 01:01 | I think we can leave everything
pretty much as it is, and save.
| | 01:05 | So, we have added a field to the Product Type.
| | 01:08 | Now, that's the template on
which all of our products are based.
| | 01:11 | That affects the products we
already have, including the Lemon- and
| | 01:13 | Chili-flavored olive oils.
| | 01:15 | So now I am going to go back and add
flavor notes for each of those oils.
| | 01:19 | I have those flavor notes in my exercise
files here, which you received if you're
| | 01:23 | a premium member of lynda.com,
or you got this course on a disk.
| | 01:26 | So first, I will go to the Lemon-flavored
olive oil node, and I will add that text.
| | 01:32 | To do that, go in View products,
Lemon-flavored olive oil, and edit, and
| | 01:37 | there's our new field.
| | 01:38 | I will just paste in, and save.
| | 01:41 | Then I will do the same thing for
the Chili-flavored olive oil, and save.
| | 01:56 | Now if we go back and take a look,
here is our Plain bottle of olive oil.
| | 02:00 | If we switch it over to Chili, we see
both the generic text, and this extra bit
| | 02:06 | down here; Flavor notes.
| | 02:08 | But you know what, I don't
like the way that it looks.
| | 02:10 | I am going to tidy it up a bit by
removing some fields we don't need to see, and
| | 02:14 | this label: Flavor notes, and so on.
| | 02:17 | To do that, I'll go up to Structure, and
Content types, then I'm going to manage
| | 02:22 | the display of that product display.
| | 02:26 | The flavor notes, for example, can
go up here right underneath the body.
| | 02:29 | I will just save that, and if I want to
make additional changes, you'll notice
| | 02:35 | there's a link here to do that.
| | 02:36 | I'll go over to the product display
configuration, and manage the display there,
| | 02:41 | and I don't need a label, for example.
I will just say Hidden, and Save.
| | 02:46 | Now let's go back and take a look at that node.
| | 02:47 | There is our Plain olive oil, and
there's Lemon, and you'll notice it just adds
| | 02:54 | the text right after it.
| | 02:55 | Isn't that wonderful?
| | 02:56 | We could actually continue to do that, and
change the display more in ways that we want.
| | 03:00 | For example, let's say that I want to
turn this picture to be a little bit
| | 03:03 | smaller so that we can see the
text right up there at the top.
| | 03:06 | I would do that by going up to
Structure, and Content Types, back to our Product
| | 03:12 | display, and I want to change the image,
but you know what? That's not here.
| | 03:16 | I have to go over to the Product
display configuration, manage its display
| | 03:20 | there, and I'll change it back to medium, the
way that it was at the beginning of this course.
| | 03:24 | Update, and save.
| | 03:27 | Close that out; there. I like
that look a little bit better.
| | 03:30 | What you have seen here is really how
you end up developing Web sites generally.
| | 03:35 | Sometimes you will make cosmetic
changes, but other times you will have to
| | 03:38 | go back and change something fundamental, as
we did when we created product variations.
| | 03:42 | That's what developers call refactoring.
| | 03:45 | When you do it, be sure to first backup
your site in case anything goes wrong.
| | Collapse this transcript |
| Importing simple products| 00:00 | If you're using Drupal Commerce to
start an online business, you can now go off
| | 00:04 | and merrily add products as
you saw in previous videos.
| | 00:08 | But some of you already have inventory
that you want to sell through Drupal Commerce.
| | 00:12 | In that case, you either have the data in
an online store, or it's in some kind of
| | 00:16 | database, list, or spreadsheet.
| | 00:19 | Now, I can't tell you how to get the
data out of some other store system, but
| | 00:22 | I can tell you how to move a simple, tab
delimited list of products into Drupal Commerce.
| | 00:27 | For this, we will need to add a few modules.
| | 00:29 | The first one, and most
important, is called Commerce Feeds.
| | 00:33 | You get it by going to drupal
.org/project/commerce_feeds.
| | 00:38 | And as usual, we go down here and
copy our link, then go back to our site and
| | 00:45 | click Modules, and then click
Install new module to install it.
| | 00:51 | Paste, Install, and go.
| | 00:54 | Now, if we go back to enable that newly added
module, we will find that we are not able to.
| | 01:00 | Let's go down and take a look.
| | 01:01 | So there is Commerce Feeds, and an
example, but we can't actually click it,
| | 01:04 | because it has several requirements.
| | 01:06 | It needs Commerce Feeds, which in turn has
its own requirements. Well, that's okay.
| | 01:10 | We will just go drupal.org/project/feeds.
| | 01:18 | Then do the same thing.
| | 01:19 | Go back to our Modules page, and install that.
| | 01:26 | Once again, we attempt to
enable the modules we just added.
| | 01:32 | Nope, it's still not working.
| | 01:33 | We will go down and enable Feeds.
| | 01:35 | Oh, but that in turn requires
job scheduler, and back we go.
| | 01:40 | This is something that
you'll find with Drupal sometimes.
| | 01:42 | You have one module that depends on another
module, which in turn depends on another one.
| | 01:47 | That's okay; we will get to the end of this.
| | 01:48 | I'm going to go do drupal.org/
project/job_scheduler, and download that.
| | 01:58 | Remember, you have to grab the Drupal
7 version, even though it's an Alpha.
| | 02:02 | Hopefully by the time you watch this,
it will be out of alpha, and more ready to
| | 02:06 | use, but I haven't had any problems with it.
| | 02:08 | Back up to the top of the page; Install.
| | 02:14 | Now I believe we can enable our module.
| | 02:16 | We will find out by collapsing all of
these, and there is Commerce Feeds, and
| | 02:22 | Commerce Feeds Example.
| | 02:25 | When I enable that, it asks if I
want to enable all of the other parts.
| | 02:30 | The last thing I am going to do is
just take a look and make sure that
| | 02:32 | everything is enabled that we need enabled.
| | 02:35 | So down here, Commerce Feeds; very good.
| | 02:39 | We don't really need Commerce Feeds Example.
| | 02:41 | And for feeds, I'm also going to
add Feeds Admin UI, and Feeds Import.
| | 02:49 | Then Job Scheduler is fine, and we're done.
| | 02:51 | Now we're ready to start importing our products.
| | 02:54 | Let's take a look at the controls.
| | 02:56 | There are two parts.
| | 02:57 | First, you set up the
import, then you execute it.
| | 03:02 | To set up the import, you go to
Structure, and Feeds importers.
| | 03:06 | We have two examples here, but I am going to
create a new one, which I'll call a Product import.
| | 03:14 | You need both, a name that you can read,
Product import, and then also one for
| | 03:17 | the machine, which is all
lowercase with an underscore, and create.
| | 03:21 | Now, the Feeds module has a lot of settings.
| | 03:23 | I will only change those that are
relevant to our particular import, but I
| | 03:27 | definitely recommend you spend some
time exploring these controls, and reading
| | 03:31 | the documentation for
feeds if you want to know more.
| | 03:34 | That documentation is linked from
the Feeds Project page, which is at
| | 03:37 | drupal.org/project/feeds. But here we go.
| | 03:41 | First I'll look at the Basic settings.
| | 03:44 | We don't need to import every 30
minutes; we will just do it once.
| | 03:48 | We're going to change it so that
instead of going out to the Web to look for
| | 03:51 | information, it goes to a file.
| | 03:56 | The parser isn't going to change an RSS
feed; instead we are going to be using
| | 04:00 | our Comma Separated Value file, or CSV.
| | 04:05 | For the CSV parser itself, we will
change the delimiter to Tab, because that's
| | 04:09 | the way that we have the file
set up, as you will see in a minute.
| | 04:11 | Of course, you will make these changes
depending on what sort of data file you have.
| | 04:17 | For processor, we are going to change
it so that it creates products instead of
| | 04:21 | nodes, and then we'll look at those settings.
| | 04:24 | Instead of having it as an anonymous
author, I will change it to admin, and the
| | 04:30 | Product type becomes a Product; very good.
| | 04:34 | Those are the basic changes.
| | 04:36 | Then there's a few we have to look
at the data file itself to understand.
| | 04:39 | I already have that file open here.
| | 04:42 | As I said, our bits of data are
separated by tabs, but of course, they could be by
| | 04:46 | commas, or other delimiters
between the different fields.
| | 04:49 | Our fields are listed here at the top;
| | 04:51 | the SKU, the Product Name,
Price, and Description.
| | 04:55 | This is called the Header row, and you
might have noticed that we had to specify
| | 04:58 | that we are using a Header row.
| | 05:00 | Now we go back to our Commerce
Product processor, and we will change the
| | 05:04 | mapping so that we know what fields in
Drupal are going to be match with what
| | 05:08 | fields in our text file.
| | 05:10 | The source field -- if we look back here,
the first is called SKU, and that gets
| | 05:16 | mapped to Product SKU.
| | 05:18 | We will add that, and then
continue with the other fields.
| | 05:27 | The Product Name becomes the title.
| | 05:36 | The Price becomes the Price Amount, and
for the Description, we actually don't
| | 05:45 | have any place for it to go.
| | 05:47 | Remember, the description shows up
in the product display node, not in
| | 05:51 | the product itself.
| | 05:52 | So we will actually come back to that
in just a minute, because we're also
| | 05:54 | going to repeat this import for the node, so
that we can display the product we've created.
| | 06:00 | So we save this, and now we are ready to import.
| | 06:03 | To do so, go up to the name of
your site, slash, import.
| | 06:08 | There is our Product import, I select it;
look through the different settings.
| | 06:13 | Yup, TAB delimiter; looks good.
| | 06:14 | There are headers, that's unchecked, so
now all we have to do is choose our file,
| | 06:21 | and click Import, and when it's done,
we see that three items were imported.
| | 06:26 | We can check this by going up to Store,
and Products, and there they are: Guided
| | 06:32 | tour of our orchard, Friday-
night concert, and Night in our lodge.
| | 06:36 | So now we have our products in Drupal
Commerce, but if you've been watching
| | 06:39 | the series this far, you know we have
to create the product display nodes as
| | 06:42 | well. But that's okay.
| | 06:43 | We can use the same exact procedure, and
in fact, we will use the same data file.
| | 06:48 | We will just match the products
to their nodes using the SKU field.
| | 06:52 | To do that, once again, we'll create an importer.
| | 06:54 | Go up to Structure, Feeds
importer, and New Importer.
| | 06:58 | We're going to call this
Product display importer, and save.
| | 07:06 | Once again, we have to change many settings.
| | 07:07 | I will just go through this quickly.
| | 07:33 | Finally, we get back to our mapping.
| | 07:36 | To see what the mapping will be,
once again, we'll look at our text file.
| | 07:40 | So the first one is SKU; paste it in
there, and this one actually gets mapped to
| | 07:45 | two different places.
| | 07:47 | First, it gets mapped to the SKU as
you'd expect, but it also gets mapped to
| | 07:53 | something called the GUID, which
is a Global ID, and I will add that.
| | 07:59 | Then we go back and map the other parts.
| | 08:01 | Product Name goes to the title. The
Price doesn't go in, because that showed up
| | 08:12 | in the product, not in the product display node.
| | 08:15 | However, the Description goes to the body.
| | 08:22 | Now we're ready for our import.
| | 08:24 | I'll save that, and go to slash, import.
| | 08:30 | This time we are going
to import Product display.
| | 08:34 | Make sure that we have the file we want,
I will go up and find it, and away we go.
| | 08:41 | There; three items were imported.
| | 08:43 | We go back to our front page, and we
see them right there. Because we had no
| | 08:47 | images for them, we have this default
image; that's all good, and we can add them
| | 08:51 | to the cart, just like any other product.
| | 08:53 | If we go in and take a look at the
nodes themselves, they work fine.
| | 08:58 | That worked pretty well, huh?
| | 08:59 | But the truth is, a lot can go wrong.
| | 09:02 | Here are some of the biggies.
| | 09:05 | The first common error is when
you have malformed separators.
| | 09:08 | That's when you put in a comma when
you're expecting a Tab, or if you have
| | 09:12 | quotes in the wrong place, and Feeds
importer thinks that that's the end of a field.
| | 09:17 | The second big error is
if you misspell a header.
| | 09:20 | That's why you saw me often go in and
copy and paste, even if it was something
| | 09:24 | very simple like SKU, because I wanted
to make sure that I got it exactly right,
| | 09:28 | otherwise Feed importer simply won't work.
| | 09:32 | Finally -- and this is a biggie --
| | 09:34 | if your file has non-UNIX or Linux
line endings, as you sometimes get in some
| | 09:38 | text processors on Mac or Windows. That
commonly comes up if you save the file
| | 09:42 | into Excel, and then save it
out as an Excel text file.
| | 09:45 | I have to tell you, I've use the Feeds
module a lot, and I have run into all of
| | 09:50 | these problems when I started out,
| | 09:52 | but when it works, it is beautiful.
| | 09:54 | I recommend that you run a few small
test imports before bringing in your entire
| | 09:58 | inventory file, so you'll be able to
tell whether errors are caused by your
| | 10:02 | procedure, or by issues in the data.
| | 10:05 | As always, backup your site before
attempting any big imports or other changes.
| | Collapse this transcript |
| Importing complicated products| 00:00 | In another video, I showed you how to
import what I call simple products, with
| | 00:04 | only an SKU, name, and price, and description.
| | 00:07 | But in the real world,
products are almost never that simple.
| | 00:11 | They usually have at least a photo, and
are often categorized, as if they're
| | 00:14 | in a department store.
| | 00:16 | They might also contain data that
Drupal Commerce isn't expecting.
| | 00:19 | Those three issues;
| | 00:20 | picture files, taxonomies, and unexpected
data, all require a bit of work to import.
| | 00:26 | This video shows you how, and along
the way, we're going to touch on a tricky
| | 00:30 | subject related to how you
define categories in your store.
| | 00:33 | As we look through the front page, we
see a few different kinds of products.
| | 00:37 | First, we have the ones we added earlier;
| | 00:39 | the olive oil, and the lip balm.
| | 00:42 | They all have graphics, whereas the
items that we imported later don't have any;
| | 00:46 | they just get this default image instead.
| | 00:49 | In this import, we're going to bring
in some items that do have graphics.
| | 00:53 | The first thing we have to
do is to move the files over.
| | 00:56 | For that, we go to our exercise files.
| | 00:58 | You'll notice that there is a folder
that says where you should add these.
| | 01:02 | I will hide everything else,
| | 01:03 | so I can see my Desktop, and then
open up my Drupal Commerce installation.
| | 01:10 | This has to go into sites>
twotrees>files>field>image,
| | 01:19 | and I will open this up,
and copy all of those over.
| | 01:22 | I should explain that I figured out
where exactly these go by first creating
| | 01:26 | some products in the normal way, and
seeing where the files were placed.
| | 01:30 | Then when it was time to do the
import, I simply copied what Drupal
| | 01:33 | was naturally doing.
| | 01:35 | So we have those in the correct place,
so I can close that up, and go back and
| | 01:39 | take a look at the file itself.
| | 01:42 | We see that we have an SKU, Product Name,
Price, Flavor, and several other fields.
| | 01:47 | Another way that you could look at this,
by the way, is by opening it up in Excel,
| | 01:51 | or some other spreadsheet program.
| | 01:52 | I will bring up Excel, and then I
will just drag it in, so I can see it.
| | 01:57 | That's actually a little bit easier to
look at, because it separates out the
| | 02:01 | fields in a more organized fashion.
| | 02:03 | I do want to warn you, though, if you
save this Excel file, you won't be able to
| | 02:07 | import it into Drupal correctly,
because it'll put Windows line endings on
| | 02:11 | the end of each row, instead of the
proper kind of UNIX or Linux line endings.
| | 02:16 | As we look through here, I just want to
point out this image row down here at the end.
| | 02:20 | We're specifying the entire path.
| | 02:22 | This will have to be changed when you
move it to a production server, because
| | 02:25 | right now it's referring
specifically to our development server.
| | 02:29 | That's okay; when it comes time to do
that import on your production server, of
| | 02:33 | course, you'll use whatever the
path is that you should be using there.
| | 02:36 | Now I am going to take a quick look at
the way that our products are set up, so
| | 02:39 | I can be sure that my text file is
correct in all of the fields that it has.
| | 02:44 | To do that, I go up to View products,
and then take a look at the Product Types.
| | 02:48 | I could have also gone to Store, and
Products, of course, as I usually do.
| | 02:51 | Let's take a look at manage fields.
| | 02:54 | Okay, so we have the SKU, Title,
Image, Price, and if I look back at my
| | 02:58 | text file, we have SKU, Name,
which is the same as Title, Price, and
| | 03:03 | there's our Image, and so forth.
| | 03:04 | You would go through, and you'd make sure
that you have everything that you need.
| | 03:07 | There is one field I want to point
out that's a little bit different.
| | 03:11 | You might remember in a previous video,
we put together this Flavoring field,
| | 03:15 | and if we go in and take a look at it,
it specifies which values are allowed.
| | 03:20 | This can be an issue, because let's say
that we try to import a flavoring that's
| | 03:24 | not part of this list. All the rest
of the import will be correct, but this
| | 03:28 | particular field won't be filled out.
| | 03:31 | This is one way to
categorize things on the site.
| | 03:33 | The other is by using taxonomies, as
you learned in the video, Categorizing
| | 03:37 | products, and we will be facing
that a little bit later in this video.
| | 03:42 | But for right now, I am just going to
add the things that we need to this list.
| | 03:45 | So we have Plain, Lemon, Basil, and Chili.
| | 03:48 | If I take a look here, we have Flavor;
orange, basil, rosemary, and garlic.
| | 03:53 | Okay, so we have a few extras;
| | 03:54 | orange, rosemary, and garlic.
| | 03:56 | I am simply going to add those.
| | 03:59 | By the way, I'm adding both
the key and the value here.
| | 04:03 | You can add simply one, and then Drupal
will fill in the other, and you can learn
| | 04:06 | about that by reading the text down here.
| | 04:08 | It's just the way that Drupal works.
| | 04:10 | Anyway, we'll go on, and save it.
| | 04:12 | Now we're ready for our import.
| | 04:14 | You might remember from the previous
video that we had to go in and make sure
| | 04:18 | that we were matching our fields correctly.
| | 04:20 | To do that, go up to
Structure, and Feeds importers.
| | 04:24 | I am going to change the existing
product import we have by clicking Edit, and
| | 04:28 | then take a look at the mappings.
| | 04:31 | We have SKU, Product Name, and Price already.
| | 04:35 | So we have the SKU, Product
Name, and Price; so far so good.
| | 04:39 | We also have a few others;
| | 04:40 | Flavor, and Flavor notes we'll have to
add to that product, along with Image.
| | 04:45 | These two: Description, and Catalog
category, you might remember are actually in
| | 04:49 | the product display node,
and we'll add that later.
| | 04:52 | But for now, we're going to need to
add Flavor, and I will switch back to my
| | 04:56 | text file to make sure that
I'm copying this correctly.
| | 05:02 | Flavor goes to Flavoring. Flavor notes
goes to Flavor notes, and Image, which
| | 05:17 | remember is a path, which goes to Image.
| | 05:23 | We save that, and try our import
by going to Slash, import. Here we go!
| | 05:31 | Product import, make sure that we have the
correct file chosen, and go for it. There we go!
| | 05:43 | We have 11 items imported, and if we want to
see them, we'll go up to Store, and Products.
| | 05:51 | There they are; lots of new stuff.
| | 05:54 | Now it's time to bring in the product displays.
| | 05:57 | Again, I can take a look at the file
to make sure that it's as we expect.
| | 06:00 | But the thing we're going to be
matching up to, you might remember, is in
| | 06:03 | Structure, Content types, and Product display.
| | 06:07 | Here we have Title, Body,
Product, and Type of product.
| | 06:10 | Let's take another look at our file in Excel.
| | 06:13 | Title will be the Product Name,
Description will be the Body, Category, of course,
| | 06:19 | we just mentioned, and what was the last one?
| | 06:21 | The product itself, which
is the Product reference.
| | 06:23 | So, to make this work, we will go
back to our importers; Structure, Feeds
| | 06:28 | importers, and Product display importer, and once
again, we edit that, and change the mapping.
| | 06:34 | Fortunately, most of this is already set up.
| | 06:37 | The one thing that's
missing is the type of product.
| | 06:40 | If we look back at our spreadsheet,
we have Edible oils, and Cosmetics.
| | 06:44 | To check on those, we have to go to the
other kind of categorization: the taxonomy.
| | 06:48 | You might remember we set up this
category, and if we list the terms there, we
| | 06:51 | see Apparel, Cosmetics, and Edible oils.
| | 06:54 | We have Cosmetics, and Edible oils.
| | 06:56 | In this case, we don't have to
add any additional categories.
| | 06:59 | The reason I am bringing this up is
to show you those two different ways of
| | 07:02 | categorizing things: either as lists in
the field, or as taxonomy terms. And when
| | 07:08 | you're doing an import, it's very
common to miss out on one of those, and
| | 07:11 | therefore, you bring in your import,
and it's missing those fields in those
| | 07:15 | particular nodes, or products.
| | 07:18 | But in this case, we should just be
able to go back to our Structure, and Feeds
| | 07:21 | importer, edit our Product display
importer, and then we'll change the mapping to
| | 07:26 | take into account that extra category.
| | 07:29 | The name of the field is Catalog category.
| | 07:32 | Once again, I am actually going to copy
that to make sure that I have it right,
| | 07:37 | and the target is going to be Type of product.
| | 07:40 | Now let's try that.
| | 07:42 | We save it, and go back to Import.
| | 07:47 | This time we'll do a Product display import.
| | 07:52 | Make sure that we have the
correct file, and import.
| | 07:58 | Now, the proof is in the pudding. Let's
go to our front page, and there they are!
| | 08:03 | We have our products, we have our
product displays with all of the correct
| | 08:06 | graphics. We can add them to the cart,
which shows that they're actually
| | 08:09 | working, and in fact, if we click Add to cart,
there it is. It shows up in our Shopping cart.
| | 08:15 | Well, we covered a lot of ground in this
video, and yet we only scratched the surface.
| | 08:20 | In the process, you saw how early decisions
when planning your site can have big effects later.
| | 08:26 | My intention wasn't to show you all
the different ways you might have to play
| | 08:29 | with feeds to make your import work,
because there are simply too many
| | 08:32 | possibilities. Instead, I hope this
gives you some techniques that you will be
| | 08:36 | able to use to get past all the
rough spots that you are going to find when
| | 08:40 | you try your own import process.
| | Collapse this transcript |
|
|
5. Managing Your WorkflowShipping products| 00:00 | You can divide salable
items into two categories;
| | 00:03 | the tangible, and the virtual.
| | 00:06 | We're going to talk about the
tangible items, which have weight, and heft, and
| | 00:09 | have to be shipped.
| | 00:10 | You actually have to
deliver them to the purchaser.
| | 00:12 | That means collecting a delivery
address, setting up a shipping method, and
| | 00:16 | charging the purchaser for transit,
| | 00:17 | if that's the way your store is set up.
| | 00:19 | In Drupal Commerce, you do all that
by first installing a general shipping
| | 00:23 | module, and then installing another
module that's specific to the shipping method
| | 00:26 | you're going to use.
| | 00:28 | As I write this, there are only
a couple of such method modules.
| | 00:31 | The one I'll show you will charge a
specific amount for each package shipped;
| | 00:35 | that is, a flat rate.
| | 00:36 | We start off by downloading the
basic commerce shipping module.
| | 00:40 | To get it, go to drupal.org/project/
commerce_shipping, scroll down, and install
| | 00:50 | it in the usual way. Then enable it.
| | 00:59 | I am going to enable both the Shipping
module, and the Shipping Method Example,
| | 01:08 | along with the Shipping UI.
| | 01:09 | Be careful, because if you don't enable
the Shipping UI, you won't actually be
| | 01:12 | able to make any changes. Then we save.
| | 01:15 | We'll start off by looking at the Example
Shipping method that comes with the module.
| | 01:20 | Now remember, this doesn't actually
do anything; it's included just to show
| | 01:23 | people how shipping methods should work.
| | 01:26 | To go to it, we go up to
Configure Store, and Shipping settings.
| | 01:29 | Then I will take a look at the Example
plugin, and enable it, and yes, that's
| | 01:34 | exactly what we want to do.
| | 01:35 | Once we have done that, you can make
some other changes by clicking edit.
| | 01:39 | For example, I will change the
action a little bit by editing it.
| | 01:44 | The Shipping label is going to be,
let's say, By carrier pigeon, and the price
| | 01:49 | will be $6, and save.
| | 01:52 | Now, let's go ahead and order something.
| | 01:54 | To do that, I will go to my front
page, and as it happens, I already have
| | 01:58 | some things in the cart,
| | 01:59 | so I'll take a look at the cart.
| | 02:01 | We don't see the shipping here.
| | 02:02 | Let's continue on to checkout.
| | 02:04 | Scroll down a little bit, and take a look
at our shipping method, and there it is.
| | 02:07 | It actually has an option for charging
twice the normal amount, which I will
| | 02:10 | just leave blank, and it has this test
field, which I will just put test in.
| | 02:13 | Again, this is an Example Shipping
method; it doesn't actually do anything.
| | 02:17 | It's saved our billing information from
the last time we ordered something, but
| | 02:21 | now there's this new shipping information.
| | 02:23 | I will fill it in with my information,
and continue on, and there it is;
| | 02:32 | now we have this Example shipping
costs down here, right with the Subtotal, and
| | 02:36 | the Order total, and of course, you
could continue and finish up the order.
| | 02:39 | Again, I just will do that; I will
say Test, and Continue, and there it is.
| | 02:43 | If we view our order, we see that it
includes the shipping method right there,
| | 02:48 | and everything is correct.
| | 02:50 | So that's the example method.
| | 02:51 | Now, let's try the flat rate shipping
method, so you can see a little bit about
| | 02:54 | how shipping methods can vary.
| | 02:56 | Once again, we go up to Configure Store,
and down to Shipping settings, and there
| | 03:00 | you see Flat rate. We will enable that one,
| | 03:04 | and once again, we'll edit it.
| | 03:07 | We edit the action itself, and we
have some slightly different options.
| | 03:10 | I am just going to say that this is
Flat Rate, Shipping rate is also $6, and we
| | 03:16 | say whether it's per line item, per
product, or I am going to say per Order;
| | 03:20 | it's always a flat rate of $6. Go down, and save.
| | 03:23 | Then if we go back into our order,
we'll add something to the cart, and go
| | 03:27 | through the same process.
View the cart; checkout.
| | 03:32 | Now we have a choice of Flat Rate, and
as we click that, you will notice that
| | 03:35 | that express rate disappeared.
| | 03:36 | This is a very nice thing
that Drupal Commerce does.
| | 03:39 | It integrates a lot of JavaScript in,
so that when you change your options, it
| | 03:43 | automatically gives you the correct
choices, and of course, I would continue, and
| | 03:47 | we'd get the same sort
of thing when we finished.
| | 03:50 | At the time that I'm recording this, we
only have a few modules out there for shipping.
| | 03:54 | One of them that's very useful is
called Commerce Physical Product, at
| | 03:58 | drupal.org/project/commerce_physical.
| | 04:02 | This lets you define the size, shape,
and weight of a product, so that you can
| | 04:06 | change to how much something cost to
ship based on its weight, for example.
| | 04:10 | Another one is Commerce UPS, which as
you can guess, is the commerce method for
| | 04:15 | the United Parcel Service in the United States.
| | 04:17 | By the time you see this, there is a good
chance that many others will be available.
| | 04:21 | I expect Drupal Commerce to follow
the lead of its predecessors, which
| | 04:24 | was called Ubercart.
| | 04:25 | Ubercart now has modules for several
shipping methods, including FedEx, and the US
| | 04:30 | and Canadian Postal Services.
| | 04:32 | I do think that Drupal
will have all those as well.
| | 04:35 | In the meantime, there are
several ways to control shipping costs.
| | 04:38 | For example, you can create rules that add
surcharges for shipping outside your country.
| | 04:43 | In any case, the modules we have here
for Flat rate Shipping and Commerce UPS
| | 04:48 | are a good first step.
| | Collapse this transcript |
| Managing inventory| 00:00 | Alas, nothing lasts forever, and for many types of
salable items, it's possible to run out of stock.
| | 00:07 | Certainly, that's true for physical
items, like books, but it's also true for
| | 00:10 | some non-tangible items,
such as seats at a concert.
| | 00:14 | Even if the item isn't truly limited,
you might want to set an artificial
| | 00:17 | limit to create scarcity.
| | 00:20 | In any case, the way you do that is
with the Commerce Stock module, which is
| | 00:24 | available at drupal.org/project/commerce_stock.
| | 00:30 | As usual, we'll go down, and
download it, and enable it.
| | 00:33 | You'll find the module in the Commerce (Contrib)
group on your Modules page, and then save.
| | 00:51 | Once you've done that, you'll notice a
new setting when you click Configure store.
| | 00:55 | It's the Stock management; let's go there.
| | 00:58 | We'll enable it for the only product type
we have, which is Product, then click Submit.
| | 01:02 | Now once we do that, we have an
option to check a box here to allow stock
| | 01:06 | override for a specific product. That
means we can vary it from product to product.
| | 01:10 | I'm going to go ahead and say that yes,
we want to do that, and submit again.
| | 01:14 | Now before we go on, I'm going to go
back and fill in a stock amount for all of
| | 01:18 | those products that we already have.
| | 01:20 | If we don't, nobody will be able to order them.
| | 01:23 | I'll show you how with one,
and then we'll just skip ahead,
| | 01:25 | and I'll do those offscreen.
| | 01:28 | To do so, go up to View
products, and let's change Olive Oil.
| | 01:32 | I'll edit it, scroll down a
little bit, and there is our Stock.
| | 01:35 | Now, you'll notice it's a required field.
| | 01:37 | I'm going to say that we
have 10 of those, and save.
| | 01:41 | Now that a checkbox there, Disable
stock for this product, would let you say we
| | 01:45 | have an unlimited supply of this thing.
| | 01:47 | That's where the override came in.
| | 01:49 | Now I'll go ahead and add stock
for all the other products we have.
| | 01:53 | Okay; I've recorded that we
have five of each product in stock.
| | 01:57 | Now let's see how that
affects the ordering process.
| | 02:00 | To do that I'll go home.
| | 02:01 | I'm going to go to the front page, view
my cart, and empty it out first. Great!
| | 02:07 | I'll go back, and I'll order something.
| | 02:10 | Let's make at this Hand cream.
| | 02:11 | I'll go through the whole process, view
the cart, there it is, checkout; do all
| | 02:17 | the usual stuff I would. I send it by
Flat Rate, and my name, and continue on.
| | 02:34 | Once again, we check everything. It looks good.
| | 02:37 | My payment is right here, it's going
to be my Test payment, and we're done.
| | 02:41 | To see how that affected the inventory,
we'll go and view products, then we'll go
| | 02:45 | down to our Hand cream.
| | 02:48 | As we look down, we see the Stock has
been diminished to 4, which is exactly
| | 02:51 | what you would expect.
| | 02:52 | Now let's go back and order 4 of
those hand creams, and see what happens.
| | 02:57 | Add it to the cart.
| | 02:58 | Let's try to buy 5, in fact. Update the cart.
| | 03:02 | It's telling me that I can only purchase
4, and if I do go 4, and update the cart,
| | 03:07 | and check out, if I were to go through
the whole process, and complete it again,
| | 03:11 | the next time that I went to that front
page, it would tell me that it's sold out
| | 03:15 | of that item, and the
button wouldn't be available.
| | 03:17 | So let's go through that.
| | 03:19 | Flat Rate; enter all my information.
| | 03:25 | Now when we go back to our front page, scroll
down; out of stock, and we can't order it.
| | 03:30 | We can still read about it, however.
| | 03:32 | And here's an interesting thing:
| | 03:34 | if you wanted to make your store
really proactive, you might be able to do a
| | 03:38 | little bit of Drupal magic, and put a
link here saying, request this item.
| | 03:41 | That way people could continue
telling you that they want that thing.
| | 03:44 | It's a good way to have a pull
marketing, instead of a push marketing.
| | 03:48 | If you want to go even further with
Commerce Stock, take a look at this video by
| | 03:52 | Randy Fay, who's one of Commerce
Stock's main developers. His video is at
| | 03:56 | commerceguys.com/resources/articles/216.
| | 04:02 | He shows how to set up rules to send
an e-mail when the stock gets below a
| | 04:05 | certain level, so you always know
how much to add to the warehouse.
| | 04:09 | But be forewarned, it's kind of
complicated. That is the nature of rules,
| | 04:13 | which is almost like a programming
language in itself, and to tell you the
| | 04:17 | truth, the details of that are
beyond the scope of this course, but even
| | 04:20 | without writing your own rules for
controlling inventory, the Commerce Stock
| | 04:24 | module gives you what you need to
keep track of what you have on hand, and
| | 04:27 | will help you avoid overselling.
| | Collapse this transcript |
| Managing orders| 00:00 | So, your business is going gangbusters.
Your catalog has attracted visitors, and
| | 00:05 | they're buying, but what now?
| | 00:07 | You have to fulfill their orders, and
later you'll need to audit the order record
| | 00:11 | figure out your profit and loss.
| | 00:13 | This video shows you how to do that,
and tells you how to change settings to
| | 00:17 | affect the purchasing experience.
| | 00:19 | First, let's revisit what the order
process is like with a critical eye.
| | 00:24 | To do that I'll start buying
something; let's say these Bath salts.
| | 00:28 | Then as usual, I'll check out. I'll
just skip the view cart process, and there.
| | 00:37 | When we're complete, we have an order
number, number 5 in this case, and as
| | 00:41 | you know, you can view the order when you're
logged in either as that user, or as an administrator.
| | 00:46 | Now let's see what that looks like
from the administrator's point of view.
| | 00:49 | To do tha, click View orders, and we
have a whole list of everything that's come
| | 00:54 | in. That's something you'll
probably want to do periodically.
| | 00:57 | You can view them by clicking either
on the Order Number, or on the View link,
| | 01:01 | and of course, that gives you a
screen that summarizes everything.
| | 01:05 | You can change things in here, and
you can look at the payment as well.
| | 01:09 | Let's say that you fulfilled the
order, shipped the widget, set aside the
| | 01:12 | ticket, or whatever.
| | 01:14 | Let's go back here to Edit, and scroll down
to the bottom, and see what options we have.
| | 01:18 | One of them is to change the Status
from Pending, to Completed, or there are
| | 01:23 | several other steps in the process.
| | 01:25 | But let's just say that we
change this one to completed.
| | 01:28 | Mind you, some modules trigger a
change in the status automatically, but that
| | 01:32 | varies from module to module.
| | 01:34 | I'll show you a way to force this change in
the video Streamlining the checkout process.
| | 01:39 | Now, I do want to mention that if
there's more than one administrator on your
| | 01:42 | site, this power to edit
an order can be dangerous.
| | 01:46 | Of course, you can take it away using
Drupal's standard system of roles and permissions.
| | 01:51 | To do that, go up to People,
and then click Permissions.
| | 01:55 | As we scroll down, you see that there's
a group called Order, so you can change
| | 01:59 | who's allowed to administer orders.
| | 02:01 | You can also make it so that people are
not able to order unless they are logged
| | 02:06 | in to your site, but no need to
go into all those details now.
| | 02:09 | So that's how you see all the
orders that came in; under View orders.
| | 02:13 | That's just the way that
Drupal Commerce comes by default.
| | 02:16 | You can also create alternate ways of
looking at these orders using Views.
| | 02:20 | I'll show you how to do that in the video,
Using Views to gain better oversight.
| | 02:24 | While we are talking about orders,
let's take a quick look at how you can
| | 02:27 | change the order flow.
| | 02:28 | We'll do that by going to
Configure store, and Order settings.
| | 02:34 | There are a few tabs up here, and
we'll start with the first one: Order
| | 02:36 | creation help text.
| | 02:38 | I'm just going to add something here:
Allow 48 hours for processing, and this
| | 02:44 | will show up whenever
somebody makes the order; very handy.
| | 02:48 | If you click Manage Fields, you can
change what people actually see when they
| | 02:51 | order, and Manage Display changes the
way that it appears on their screen.
| | 02:56 | The reason this probably looks
familiar is because orders, like products
| | 02:59 | and nodes, are entities,
| | 03:01 | so you work with them in very much the same way.
| | 03:04 | You've learned about entities in the video,
Understanding products and other entities.
| | 03:09 | Now, I mentioned earlier in this video
that you have to keep checking back to see
| | 03:12 | whether orders have come in, but you
can actually set up your store so that you
| | 03:16 | also get an e-mail, so you
know to take care of it.
| | 03:19 | This site already sends an e-mail
to the person placing the order;
| | 03:22 | we're just going to piggyback on that action.
| | 03:25 | To do that, we'll go and take a look at
our rules by clicking Configuration, and
| | 03:29 | then scrolling down, and clicking Rules.
| | 03:33 | The one that we want to change is
Send an order notification e-mail.
| | 03:37 | So I'll go over, and edit it.
| | 03:39 | The thing that changes is not what
forces the thing to happen, or under what
| | 03:43 | conditions, but the action itself,
so we'll go in and edit that.
| | 03:47 | When we look at the format of this
action, it becomes clear what we have to do.
| | 03:51 | First, there is a To area; that's who the
mail is going to be sent to, and in our
| | 03:55 | case, we're going to change this, so we
also send an e-mail to the administrator.
| | 03:59 | There is a Subject that we can change
as we like, the body of the message, and
| | 04:04 | who it's coming from. And in each
case, we have a selection of replacement
| | 04:07 | patterns, so we can put in tokens; for example,
the site's name, the site's URL, and so forth.
| | 04:14 | Now let's go back and add
another action to send another e-mail.
| | 04:18 | So I'll just go
backwards here, and add an action.
| | 04:23 | The action that we want is to Send
mail, which is down toward the bottom.
| | 04:28 | We then are faced with all of
the selections that we had before.
| | 04:31 | Now, for our To, we're going to send
it to the administrator of the site.
| | 04:35 | There is a token for that, site:mail, the
administrative e-mail address for this site.
| | 04:39 | So we'll paste that in.
| | 04:43 | Then, of course, we could do the same
for the Subject: An order has come through
| | 04:48 | on the site. And of course,
the Message of the body: Hurray!
| | 04:53 | Go and check it out.
| | 04:55 | Actually, the way we'd probably do this
is by including a link to the order by
| | 04:59 | using Replacement Patterns and so
forth, but this is good enough for now.
| | 05:02 | From, I'll just say once again,
from the site e-mail, and save it.
| | 05:08 | If we look down here, the
rule now has two actions.
| | 05:10 | The person who made the order gets mail,
and the administrator of the site, and
| | 05:15 | obviously you could keep on
editing rules to do all sorts of things
| | 05:18 | automatically when you get an order, and
in fact, that's how a lot of people run
| | 05:23 | their online businesses. An order comes in,
| | 05:25 | the store sends the shipping department
an e-mail, the data gets inserted into a
| | 05:29 | bookkeeper's database, and so on.
| | 05:32 | As with many other parts of Drupal
Commerce, the process is open to just about
| | 05:36 | any kind of
customization that you could imagine.
| | Collapse this transcript |
| Managing customer profiles| 00:00 | Usually when I wanted to show the
purchasing process in this course, I just
| | 00:04 | stayed logged in as the administrator,
just because that's the fastest way.
| | 00:08 | But there were a few times I did
switch over to another browser, and show you
| | 00:11 | what the process looks like to
someone who's not logged in to the site.
| | 00:14 | On completing the first order by a
casual visitor, the store creates a customer
| | 00:18 | profile for that person based on the
e-mail address. That's so they can go back,
| | 00:23 | log in under the new account name,
and do such things as review the order.
| | 00:27 | This video shows you a little more
about how Drupal Commerce creates and
| | 00:30 | manages customer profiles.
| | 00:32 | We'll start by looking at the obvious stuff.
| | 00:35 | Go up to Store, and Customer profiles.
| | 00:37 | You'll notice that for each order, there
is a Shipping information, and a Billing
| | 00:42 | information, and that these profile
IDs aren't related to users, or orders, or
| | 00:47 | anything like that; they are their own thing.
| | 00:49 | However, each one of these
profiles is linked to a user.
| | 00:53 | In this case, the admin for most of
them, and then there's that one time when I
| | 00:56 | ordered from somebody
who was just visiting the site.
| | 00:58 | That can be a little confusing,
but the way I think about it is this.
| | 01:02 | A user is a person, the customer
profile is two snapshots of that person at the
| | 01:08 | moment that he or she placed the order.
| | 01:10 | We'll talk more about users, and how they
relate to customer profiles, in just a minute.
| | 01:15 | Now, if we go in to edit any one of these
customer profiles, we get a warning up
| | 01:19 | here saying that the
profile is referenced by an order.
| | 01:22 | So if you change any field values,
it'll actually create a clone.
| | 01:26 | That relates back to what I was saying
about this being a snapshot at a moment
| | 01:30 | in time, but let's take a
look at the orders instead.
| | 01:33 | Go up to Store, and Orders.
| | 01:36 | If we go in and edit the Shipping
address, lets say, for any one of these orders,
| | 01:40 | we can do that, and it's just fine.
| | 01:42 | Scroll down, and we see the Billing Information.
| | 01:43 | This is one that we did before we
had the Shipping module installed.
| | 01:47 | If we make the changes here, it's okay,
because it's not changing that snapshot
| | 01:51 | of the user at that moment in time.
| | 01:53 | The lesson here is to edit the
address where it makes sense.
| | 01:56 | If it's just to change the address on
a single order, change it on the order
| | 02:00 | itself. But anyway, let's
get back to customer profiles.
| | 02:04 | Go up to Store, and Customer profiles.
| | 02:07 | Customer profiles are entities,
just like nodes and products.
| | 02:11 | We talked a little bit about entities
in the video, Understanding products and
| | 02:15 | other entities, but
customers are a little different.
| | 02:19 | Because they're so central to Drupal
Commerce's functioning, your control over
| | 02:22 | what you can do with them
is a little more constrained.
| | 02:25 | However, like other entities, each
customer profile is based on a template of
| | 02:29 | sorts, which you see here under Profile Types.
| | 02:33 | One thing you'll notice is
you can't add a Profile Type.
| | 02:36 | There is no link up here that says add,
like there is for some kinds of entities.
| | 02:39 | However, you can manage
fields, and manage their display.
| | 02:42 | The only thing that's in here by
default is Address, but if you wanted, you
| | 02:46 | could add something saying, for example,
you must put in your age, or something
| | 02:50 | else like that; any other information
that you want to collect at the time that
| | 02:53 | you collect billing information.
| | 02:55 | Let's take a look at that Address form.
| | 02:56 | There are quite a lot of options on
this page that are specific to addresses.
| | 03:00 | For example, you could limit the
countries that are available on this form.
| | 03:05 | Since, we have none selected, that means
that people can order from any country.
| | 03:09 | You could add a default value, which
by default, interestingly, is the United
| | 03:12 | States, but you could remove that if you
wanted, and then there's a few other things.
| | 03:16 | We'll just leave it as it.
| | 03:17 | So we've looked at Orders, and Customer
profiles, but you might be asking, how
| | 03:22 | does this relate to the people who are
logged in to your site; your site's users?
| | 03:26 | Well, the way we'll look at that is,
once again, we'll look at our Customer
| | 03:29 | profiles, and we see this User column.
| | 03:33 | Let's take a look at this
one: customer@example.com.
| | 03:36 | If we click it, we can go in and edit
all sorts of things here; the password
| | 03:41 | that they use to log in.
| | 03:42 | If they turn out to be a problem
customer, we can block them. That will not
| | 03:46 | block them from buying, but it will
block them from taking part in the site.
| | 03:49 | We could also give them additional permissions.
| | 03:51 | If, for example, we've known them for
years, and they've turned into a good
| | 03:54 | customer, and we want to increase the
level of involvement they're allowed
| | 03:58 | to have in the site.
| | 03:59 | As we scroll up to the top, we can also
look at the orders that they've placed,
| | 04:03 | and we can click through and look
at all the details of the order.
| | 04:07 | Now, if you're an experienced Drupal
user, a lot of this part is old hat.
| | 04:11 | Stores built in Drupal Commerce
| | 04:13 | leverage Drupal's built-in user system.
| | 04:16 | That's really good, because it means
that you can integrate store activity with
| | 04:19 | site activity really well.
| | 04:21 | For example, you could create a
site where people get credits for
| | 04:25 | performing certain online tasks, and
then buy things from the store using
| | 04:29 | those credits, instead of money.
| | 04:31 | Or you could do it the other way around;
| | 04:33 | when somebody buys something, they get
leveled up, for example, on the site.
| | 04:37 | You could build a view to look at
all of the users, or all customer
| | 04:39 | profiles; all of this stuff in the normal way
you do in Drupal, but those are advanced topics.
| | 04:45 | The important thing to know as you
launch your store is that your customers
| | 04:49 | are protected by the same high-security
system that's in use on over a million
| | 04:53 | Drupal Web sites
| | Collapse this transcript |
| Using Views to gain better oversight| 00:00 | What you're about to see might be the
most powerful video of the entire course.
| | 00:05 | That's because you're going to learn
about one of the systems that underlies
| | 00:08 | your entire store, and once you
understand how it works, you will be able to
| | 00:12 | change the organization of
pretty much everything in it.
| | 00:15 | This magical system is called views, and
it's included as part of Drupal Commerce.
| | 00:20 | Views is the single most popular
extension to Drupal, and it's quite complex.
| | 00:24 | This video gives you only a peek into
its power, but it'll be enough to let us
| | 00:28 | see at a glance how many of
each product we have in stock.
| | 00:31 | First, let's look at how
we see products by default.
| | 00:34 | To do that, we go to Store, and Products, or of
course, we could just click View products.
| | 00:40 | In the video about managing inventory,
we added a module that keeps track of our
| | 00:44 | holdings, but we don't
actually see that in this list.
| | 00:47 | We look at any particular product, say by
editing Olive oil; there is our Stock field.
| | 00:52 | But let's go back to our list of products.
| | 00:55 | One thing you might not have noticed
throughout this course is when you move
| | 00:57 | your cursor over it, you
see this little gear up here.
| | 01:01 | This is what's called a
contextual menu. It lets you edit the view
| | 01:05 | that you're seeing here.
| | 01:06 | You see, this list is actually just
a simple view, which you can edit.
| | 01:10 | So we go up, and click it, and Edit view.
| | 01:13 | By the way, there is another way to get there.
| | 01:15 | You would click Structure, and Views,
and then find the view that you want.
| | 01:19 | To tell you the truth, I prefer to do it
through the contextual menu, because then I
| | 01:23 | know exactly what I'm editing.
| | 01:25 | The way we are going to add that
field is actually fairly simple.
| | 01:28 | We go down here to this
Field section, and click add.
| | 01:31 | I am then going to do a search for stock,
and there it is; Commerce Product: Stock.
| | 01:36 | Add and configure fields.
| | 01:37 | I'll just leave it in its default, and
then before you do anything else, you might
| | 01:42 | want to see what it looks like.
| | 01:44 | So we will scroll down, and look at
the preview, and there's our stock.
| | 01:47 | If we wanted, we could move it
around by clicking rearrange.
| | 01:51 | Let's say, move it up a little bit, and apply it.
| | 01:54 | All sorts of things you can do in views,
| | 01:57 | but before we go, we have to save it.
| | 01:58 | So scroll up to the top, and click Save.
| | 02:01 | Now as you see, we are here on our
View products list, and there's our stock.
| | 02:05 | The great thing is, you can do this on
just about any screen in your store, and
| | 02:10 | with views, you can do a
lot more than just add fields.
| | 02:13 | Here; I will show you with the order screen.
| | 02:14 | We go to View orders, and then click
this contextual menu to edit the view.
| | 02:21 | Here I am going to change the filtering,
so we are going to add an exposed filter.
| | 02:26 | Click add, and add order total.
| | 02:29 | Again, I just happened to know this,
but you could scroll through and see
| | 02:32 | which one you wanted.
| | 02:35 | This is the one I want.
| | 02:36 | So I will add and configure.
| | 02:38 | I will expose this filter, and say that I
only want to see those orders which are,
| | 02:43 | let's say, greater than 10, and apply.
| | 02:49 | By the way, I am doing a mistake
here, which I will show you in a minute.
| | 02:52 | If we scroll down to the bottom here, we
see we now have this filter available to us.
| | 02:57 | Let's go ahead and save,
and see what that looks like.
| | 03:00 | Again, if I click View orders, there it is.
| | 03:03 | I can change the filter here, like let's
say we only want to see things that are
| | 03:06 | above 20. That should cut out
this one that's $19, right? Oh!
| | 03:11 | But it didn't.
| | 03:12 | So I must've done something wrong.
| | 03:14 | Let's go back in and check.
| | 03:15 | Edit view, go down to our filter,
and edit this particular one.
| | 03:19 | Now, as it turns out, the thing that
you need to know is that it's counting by
| | 03:24 | pennies, not dollars.
| | 03:25 | This is the kind of error that will
drive you crazy when you go through it.
| | 03:28 | The thing I would recommend is go and
take a look at the documentation that's
| | 03:32 | either on drupalcommerce.org,
or drupal.org/project/views.
| | 03:35 | I am going to change this so
that it shows us $10 by default.
| | 03:42 | Then I will go back up and save it.
| | 03:44 | Now if I want to see only those things
that are above $20, I'll enter 2000, and
| | 03:49 | apply, and indeed, everything below $20 drops out.
| | 03:54 | But you know what? I don't
think I like having this available.
| | 03:57 | Fortunately, I can revert it
back to its factory settings.
| | 04:00 | So once again, I'll go up to my
contextual menu, and edit the view.
| | 04:03 | Now, here I will notice, the name of
the view is Orders (Commerce Order).
| | 04:08 | In order to change this view, I have
to go up one level to where it shows all
| | 04:11 | the views, and then find that one.
| | 04:14 | Orders, yep, that looks like the one.
| | 04:17 | I will go back here, and choose revert.
| | 04:20 | Yep, that's really what I wanted to do.
| | 04:21 | Now if I go back and view
orders, it's as it was before;
| | 04:25 | there is no filter.
| | 04:26 | I do have to warn you, though:
| | 04:28 | you can't revert views that you
specifically create, and as you can see, you can
| | 04:32 | get yourself into a lot of trouble with them.
| | 04:35 | If you really want to play around with
them, I strongly recommend you watch my
| | 04:38 | Drupal 7 Reporting and
Visualizing Data series on lynda.com.
| | 04:43 | It's really amazing what
you can do with views, though.
| | 04:45 | You can, for example, create a map of
all of your customers' shipping addresses,
| | 04:49 | add totals to the order page, and so much more.
| | 04:53 | You don't need to do that to run a
successful store, of course, but the
| | 04:56 | flexibility that you get with
views is worth the learning curve.
| | Collapse this transcript |
| Accepting other payment methods| 00:00 | Early in the course I showed you how to
accept payments through PayPal, because
| | 00:04 | well, let's face it: that's pretty
much the entry-level standard online.
| | 00:08 | But if you plan to accept a lot of
payments, or if what you're selling for some
| | 00:12 | reason doesn't fit into any of
PayPal's payment plans, then you'll need
| | 00:16 | something heavier duty.
| | 00:18 | This video introduces you to some of
those payment methods, besides PayPal, and it
| | 00:23 | goes through the full process with
authorize.net, which is common in the U.S.
| | 00:27 | First, let's take a look at what's available.
| | 00:30 | To do so, go to
drupalcommerce.org, and click Add-ons.
| | 00:34 | Once there, you can sort it by Module Type.
| | 00:36 | As you scroll down, you see that there
are a lot of payment methods available:
| | 00:41 | Adyen, Authorize.net, and so forth.
| | 00:43 | We are going to use Authorize.net.
| | 00:46 | As with all payment gateways,
there are two parts to using it.
| | 00:50 | First, you get the module, and install it.
| | 00:53 | Second, you need to get
authorization from the payment processor itself.
| | 00:58 | Fortunately for us, Authorize.net gives
out test accounts for us to play with.
| | 01:02 | No money actually gets transferred.
| | 01:04 | It's just so that you can learn their system.
| | 01:07 | I found it by searching on Google, for
Authorize.net test account, and there it
| | 01:16 | is; the first link right there.
| | 01:18 | The same works for many other payment
methods. For example, Moneris test account,
| | 01:22 | or CyberSource test account. Very easy to find.
| | 01:25 | I've already signed up for a test account,
| | 01:26 | so now we're ready to go.
| | 01:28 | All I have to do is grab the
module, and install it. Go down here,
| | 01:34 | it opens a new window, scroll down, and
install in the usual way. We then enable it.
| | 01:47 | Like most commerce contributed
modules, it's in the Commerce (Contrib) group.
| | 01:52 | Enable it, scroll down,
and save the configuration.
| | 01:56 | Now we configure it, just as we did
with the PayPal module back in the video
| | 02:00 | about accepting PayPal payments.
| | 02:03 | Go up to Configure store, and Payment
methods, and then enable your Authorize.net
| | 02:08 | payment method this way. We confirm; yes.
| | 02:11 | And the last step is to go back
and edit it so that it has all of the
| | 02:14 | information for your Authorize.net account.
| | 02:17 | Go down to Actions, and click edit.
| | 02:20 | Scroll down, and here I will paste in
some information that I got from my account.
| | 02:25 | The next set of option is for Transaction
Mode, and this takes a little bit of explanation.
| | 02:29 | If you just got a developer account, as
I did, you will want to do developer test
| | 02:33 | account transactions.
| | 02:35 | This has the lowest level of security,
because no money is being transferred.
| | 02:39 | There has never been any sort of authorization.
| | 02:42 | If you've already signed up for
Authorize.net, or whatever other payment
| | 02:45 | processor you're using, you will be
using one of the live account buttons. And
| | 02:49 | of course, when you finally go online, and
you want to actually receive the money,
| | 02:53 | it'll be live transactions in a live account.
| | 02:56 | There some other settings, but
we can just scroll down and save.
| | 03:00 | That's pretty much it.
| | 03:01 | Now let's see it in action by making a purchase.
| | 03:04 | We go back to our front page, and we
will put something in our cart, and go
| | 03:07 | through the usual process.
| | 03:09 | View the cart, there it is, checkout,
scroll down, and fill out the usual information.
| | 03:19 | Then when it comes time to review
our order, we see there is an extra
| | 03:23 | option under payment.
| | 03:24 | We could, of course, do our earlier
payments, but let's go ahead with Credit card.
| | 03:27 | I am going to enter a
standard void credit card number.
| | 03:31 | It's a 4, followed by twelve 2s: 4222222222222.
| | 03:37 | Expiration will be sometime in the
future, and for Security code, we can put
| | 03:41 | any three digit number. Then we continue.
| | 03:45 | Success!
| | 03:46 | Just with the PayPal payment, or any
other payment method, you can look at the
| | 03:49 | order to get payment details.
| | 03:51 | To do that, go up to View
orders, and there it is; number 6.
| | 03:55 | Let's go in and edit it.
| | 03:57 | Click the Payment tab, and there you have it.
| | 04:00 | It gives you all of the information
that went out to Authorize.net and came
| | 04:04 | back, including an ID.
| | 04:06 | Now I want to remind you that the
system I showed you here using a test account
| | 04:10 | doesn't actually get you paid.
| | 04:12 | For that, you have to go through
quite a bit of paperwork with the payment
| | 04:15 | service provider of your choice,
| | 04:17 | so don't expect to set up your
site today, and get paid tomorrow.
| | 04:20 | Now, Authorize.net is one of only many,
many payment processors, but there are
| | 04:25 | others for which there
still isn't a module available.
| | 04:28 | The only way to know whether your
preferred payment method is available is to
| | 04:31 | look for it on drupalcommerce.org.
| | 04:33 | If it isn't, don't give up hope.
| | 04:36 | Drupal Commerce is open-source software,
which means that anybody could make it
| | 04:39 | better, including you, or if you're not
a programmer, you could pay someone to
| | 04:44 | create the payment module that you need.
| | 04:46 | The programming interface is
very open, and well-documented.
| | 04:50 | That makes it easier for
developers to work with,
| | 04:52 | so you might be surprised at just how
reasonable the price is to get exactly the
| | 04:56 | payment module that you need.
| | Collapse this transcript |
|
|
6. Organizing Your StoreChanging your store's look| 00:00 | Up until now, we've focused mostly on
how to make your store function well.
| | 00:04 | We haven't paid much
attention to its appearance.
| | 00:07 | We touched on it very briefly in the video,
Configuring your store's basic information,
| | 00:11 | but that was really just to add
this logo and favicon, and to add this
| | 00:14 | gradient effect at the top.
| | 00:16 | Now I'll show you how to
take it a little bit further.
| | 00:18 | We'll start by revisiting how
we made our earlier changes.
| | 00:21 | And by the way, I'm doing this in
Firefox for reasons that will become
| | 00:24 | apparent in a minute.
| | 00:25 | But anyway, let's go back by clicking
Appearance, and then clicking Settings next to Bartik.
| | 00:30 | This is the active theme.
| | 00:32 | You might remember that we can change all of
those colors at the top, we see a preview here,
| | 00:36 | and although we didn't go into it, you
can add and remove certain aspects of
| | 00:39 | your site's appearance by
checking and unchecking the boxes here.
| | 00:44 | There's our logo, and our favicon. Very good!
| | 00:48 | We can also switch to a
different theme entirely.
| | 00:51 | We go up and click List to go back to
this earlier screen, then let's take a
| | 00:55 | look at what it would look like in Garland.
| | 00:57 | We click Enable and set default,
and then close out the overlay.
| | 01:01 | Immediately it changes, and as you can
see, our store functions the same; this
| | 01:05 | is just the appearance.
| | 01:06 | I can add an item to the cart, for example.
| | 01:08 | It shows up over here.
| | 01:10 | If I go and take a look at the
cart, I can check out, and so forth.
| | 01:13 | It's just the appearance that
we're changing; not the functioning.
| | 01:17 | The thing is, you can use any
Drupal theme for a Drupal Commerce store.
| | 01:21 | They won't have the CSS classes that
are specific to Drupal Commerce, such as
| | 01:25 | what you see in the Checkout page.
| | 01:26 | I'll tell you more about those in a minute.
| | 01:29 | But first, here's a very quick
demonstration of how to use a pre-built theme
| | 01:32 | to change your store's overall look,
besides the ones that came with Drupal Commerce.
| | 01:37 | To do that, we'll go to
drupal.org/project/themes.
| | 01:43 | As with modules, you have to filter out
for the version of Drupal that you're using;
| | 01:47 | in our case, 7.
| | 01:48 | There are quite a few to choose from; 215
at the time that I'm making this recording.
| | 01:54 | I'm going to look for one in
particular called Danland, and there it is.
| | 01:58 | We click through, and download, and install it.
| | 02:06 | We copy the link location, go back
to our site, then go to Appearance.
| | 02:10 | And just like modules, you can install
a new theme by clicking up here, pasting
| | 02:13 | in the URL, and clicking Install.
| | 02:16 | Once that's done, you can go back to
the administration page for themes, and in
| | 02:21 | the same way as we did before, you
can enable it and set it as the default.
| | 02:24 | Now when we go home, we see our
site with a completely different look.
| | 02:29 | You'll notice our shopping cart
still has the stuff in it that we put in
| | 02:32 | earlier, and as we go through, it
has a different look. Very good!
| | 02:36 | Those themes that I showed you on
drupal.org, by the way, are all free.
| | 02:41 | They're released under the GNU public
license, which permits modification as well.
| | 02:45 | So they're not only free, as in not
having to pay any money, but you're free to
| | 02:49 | do whatever you want with them.
| | 02:51 | There are also some commercial
themes available. For example, from
| | 02:55 | Top Notch Themes, which you can
get to at topnotchthemes.com.
| | 03:00 | But let's go back, and change this
back to our original Bartik theme.
| | 03:04 | To do that, go back, and set it as the default.
| | 03:06 | When we close our window, we see our changes.
| | 03:10 | So that shows you how to change your
entire site's appearance with one of
| | 03:13 | these pre-built themes.
| | 03:15 | But you don't have to accept any theme as it is.
| | 03:18 | You can alter its appearance in pretty much
any way you want by changing the CSS styles.
| | 03:23 | If we look at the Drupal Commerce
Showcase, you can see just how dramatically
| | 03:27 | the different store sites can be.
| | 03:29 | And to do that, we'll go to drupalcommerce.org.
| | 03:33 | Then click on the Showcase.
| | 03:34 | I'll just click around fairly randomly.
| | 03:37 | It has a very different look from
those that we've seen so far in the course.
| | 03:40 | If we go back and click on a
different one -- let's just try this one here in
| | 03:44 | Israel. Also very beautiful, and quite
different from the one that we just saw.
| | 03:51 | What you need to change to make those
small adjustments are in the themes'
| | 03:54 | files, which are usually installed
inside the sites/all/themes folder, inside
| | 04:00 | your Drupal installation.
| | 04:01 | Let's go back to our Desktop, and I'll show you.
| | 04:04 | So here's our Drupal installation.
| | 04:06 | Go to sites, all, and themes.
| | 04:09 | And here we see the
danland that we just downloaded.
| | 04:13 | If we look in there, we see
quite a few files that end in .css.
| | 04:16 | Let's open one of those up.
| | 04:19 | If you're familiar with
CSS, this is all familiar.
| | 04:22 | Of course, you could edit it either in
a text editor as I'm doing here, or any
| | 04:26 | other CSS editor that you like.
| | 04:28 | You do have to be careful though.
| | 04:29 | There are some important procedures to
go through when you edit a Drupal theme,
| | 04:33 | especially if you get outside of the CSS files.
| | 04:36 | I provide a very bare introduction in
my Drupal 7 Essential Training course, and
| | 04:40 | lynda.com also has another course
that's specifically on Drupal theming,
| | 04:44 | but let's get back to our site.
| | 04:47 | In order to edit the CSS, you first
have to know what CSS you want to affect.
| | 04:52 | I use a handy tool called Firebug for this.
| | 04:55 | It's a plug-in for the Firefox browser
that exposes a page's CSS structure.
| | 04:59 | You can download it for free at getfirebug.com.
| | 05:02 | I've already installed it,
so let's get back to our site.
| | 05:07 | I'll turn it on by clicking on its
little button up here, and then start exposing
| | 05:12 | things as I go around the page.
| | 05:15 | One thing about using an existing theme
is that you might want to change those
| | 05:18 | Commerce specific classes.
| | 05:20 | Firebug is great for
figuring out which ones they are.
| | 05:23 | For example, let's take a
look at our Shopping cart page.
| | 05:27 | These rows here are Commerce specific,
and if we go on to our for Checkout page,
| | 05:32 | we see some more Commerce specific classes here.
| | 05:35 | One way that we know that they're
Commerce specific is if you look down here,
| | 05:38 | commerce shows up in the name of the class.
| | 05:41 | You can find out more about
theming for Drupal Commerce by going to
| | 05:44 | drupalcommerce.org/faq/themes.
| | 05:50 | Now obviously, we couldn't go very
deeply into this subject in just one video.
| | 05:54 | There's a lot to learn.
| | 05:56 | But you do have three
tricks now at your disposal.
| | 05:59 | First, you can change the settings in
the active theme's appearance settings, as
| | 06:03 | I showed you earlier.
| | 06:05 | Second, you can switch to a whole new
theme by downloading it for free from
| | 06:09 | drupal.org, or possibly by buying
one from a commercial theme vendor.
| | 06:13 | Third, you can build
your own theme from scratch.
| | 06:16 | That's a huge subject in itself, and one
that's well covered by other videos on
| | 06:20 | lynda.com, particularly those about CSS.
| | Collapse this transcript |
| Streamlining the checkout process| 00:00 | The folks who developed Drupal Commerce
had previously created another shopping
| | 00:04 | cart system called Ubercart.
| | 00:06 | That experience taught them a lot, and
one of the things they learned is that
| | 00:09 | there's a wide range of variation
in how merchants want to set up their
| | 00:13 | checkout procedure.
| | 00:14 | For example, let's say you
only offer one shipping method.
| | 00:18 | You could make the checkout screen more
sleek by removing that shipping method
| | 00:22 | section, since there's only
one thing for people to choose.
| | 00:25 | We'll start with something
that people often want to change.
| | 00:28 | Way back in the video Managing Orders,
I pointed out that by default Drupal
| | 00:32 | Commerce changes an order's
status to pending when it's done.
| | 00:36 | You have to manually change it to
complete it, presumably after you've actually
| | 00:39 | shipped or delivered the product.
| | 00:41 | We can see that by going up to View
orders, and looking down here, we see that
| | 00:45 | some are Pending; some are Completed.
| | 00:47 | The ones that are completed, I
specifically had to change to Completed.
| | 00:50 | If we edit any one of these, we see where
we do that down at the bottom of the page.
| | 00:55 | But if you're selling an online
product, you'll probably want it to
| | 00:58 | immediately go to Completed.
| | 01:00 | You can do that by changing the checkout rules.
| | 01:02 | We'll go up to Configure store, and
down to Checkout settings, and then
| | 01:07 | click Checkout Rules.
| | 01:08 | You'll notice the first one here:
Update the order status on checkout
| | 01:13 | completion. Go in to edit it,
| | 01:16 | and as we've done before, we change
the action itself by clicking edit.
| | 01:20 | Now, you'll notice it has this Order State.
| | 01:23 | Simple enough; we'll change
it to Completed, and Save.
| | 01:27 | Now whenever somebody goes through and
orders something, it'll immediately say
| | 01:30 | Completed when they've finished their order.
| | 01:32 | Now, you could also have added some
conditions up here so that, for example, the
| | 01:36 | status goes to Pending if you still
need to ship something, but Completed, if
| | 01:40 | it's for a virtual good that's
delivered immediately online.
| | 01:43 | So that's one way you can
adjust the checkout process.
| | 01:47 | But you can also change the screens
that people see when they check out.
| | 01:50 | You can either remove screens entirely,
or change what's on any individual one.
| | 01:56 | To demonstrate these, I'll
start an order in a separate tab.
| | 02:00 | We already have an item in our
cart, so I'll look at the cart.
| | 02:03 | Yep, there it is, and go to checkout.
| | 02:05 | Now let's go back to our example.
| | 02:07 | Let's say you only offer one shipping method.
| | 02:10 | So down here, you don't want to
give them these options between carrier
| | 02:13 | pigeon, and Flat Rate.
| | 02:15 | The first thing I'm going to do is I'm
going to take away that carrier pigeon
| | 02:18 | one. I'll go back to my administrative
screen here, go up to Configure store,
| | 02:22 | Shipping settings, and I'll disable that
example plug-in, which we've changed to
| | 02:26 | that silly carrier pigeon one.
| | 02:29 | Confirm it, and close out that window.
| | 02:32 | Now if we go back to the screen where
somebody is checking out, and reload the
| | 02:35 | screen, we have this useless Shipping area.
| | 02:38 | Obviously, someone can't change anything there.
| | 02:40 | To make the change, and once again I'll
go to my administrative screen, go up to
| | 02:44 | Configure store, and then Checkout settings.
| | 02:47 | Now, each section here: Checkout, Review
order, and Payment, are separate pages.
| | 02:52 | Each row here is a separate part of that page.
| | 02:56 | You notice that we have a
Shipping row on the Checkout page.
| | 02:59 | Well, we can get rid of that.
| | 03:00 | We'll just take it, and drag it into
Disabled at the bottom of the page.
| | 03:04 | We click Save configuration.
| | 03:06 | Then I'll go back and look at
what the checkout looks like.
| | 03:09 | When I reload the page, Shipping has
disappeared entirely. That's great!
| | 03:14 | Now let's take another look at
those checkout settings by going up to
| | 03:17 | our Control tab here.
| | 03:18 | Next to each one of these
rows, you'll see a configure link.
| | 03:22 | Let's take a look at the Shopping cart contents.
| | 03:25 | The first set of options is
how it's displayed on the page.
| | 03:29 | If we go back to our Checkout page, we
see that this is just in a simple pane,
| | 03:34 | which is described here as
in a non-collapsible fieldset.
| | 03:37 | Let's say that we want to put
it into a collapsible fieldset.
| | 03:40 | We'll scroll down, and Save configuration,
then go back and see how that changes things.
| | 03:45 | When I reload the page, we see that
people can now actually hide that part by
| | 03:49 | clicking on this link here.
| | 03:51 | Likewise, if we go back and configure it
again, we can put it into a pane that's
| | 03:56 | already collapsed, or we could have
it not display that particular pane.
| | 04:01 | I'm going to just return
it to the way that it was.
| | 04:03 | The other thing that's common under
of these configure links is this Include
| | 04:07 | this pane on the Review checkout pane.
| | 04:10 | You might remember that as we went
through this process, first you looked at the
| | 04:13 | cart, then checkout, then there was review.
| | 04:16 | By checking or unchecking these boxes
for each of these panes, you can decide
| | 04:19 | what's important for people to review
before they actually submit the order.
| | 04:23 | Finally, some of these things let you
change specific settings, for example, to
| | 04:27 | customize the message that people
get when they've completed an order.
| | 04:30 | I'll show you that by going back all
the way to the list here, and then going
| | 04:35 | down here to the Completion message.
| | 04:37 | When I configure that, I can override
the default message and say, for example,
| | 04:43 | Thank you for your order! And save it.
| | 04:46 | Finally, the last thing you can do is
reset to defaults on any one of these panes.
| | 04:51 | I do recommend that you test the
checkout process in a few different ways, and
| | 04:55 | most importantly, measure their results.
| | 04:58 | Unfortunately, it's really common
for customers to get almost all the way
| | 05:02 | through a purchase, and then quit it at
the last moment, because the checkout
| | 05:06 | process wasn't what they expected.
| | 05:09 | There's even a term for that.
| | 05:10 | It's called abandoned cart syndrome.
| | 05:12 | You'll never get rid of it entirely, but
you can minimize it by removing as many
| | 05:16 | unnecessary steps as possible.
| | Collapse this transcript |
| Launching your store| 00:00 | Now we get to one of the
hardest parts of the entire series:
| | 00:03 | actually launching the store.
| | 00:06 | Up until now, we've done all our
development on our Desktop computers, but now
| | 00:10 | we have to move this all to a Web
server that's connected to the Internet.
| | 00:14 | Unfortunately, there are literally dozens, if
not hundreds of differences among Web hosts.
| | 00:19 | I'll just show you how to do some of
the basic steps using the database program
| | 00:22 | phpMyAdmin, and the file
transfer program Cyberduck.
| | 00:26 | Along the way, I'll have to
fiddle with some settings.
| | 00:29 | Again, you probably won't have the same
exact problems, but this procedure will
| | 00:33 | give you an idea of the
sorts of things you'll run into.
| | 00:36 | In general, I'm hoping to give
you the sense of how it works.
| | 00:39 | If you have any problems, what you see
here will give you enough knowledge to
| | 00:43 | ask intelligent questions
of your Web hosting provider.
| | 00:46 | They're the ones who can explain
the quirks specific to their system.
| | 00:49 | I've already set up a place to put the site.
| | 00:51 | It's accessible on the Web at tgeller
.webfactional.com, and right now, I
| | 00:57 | have nothing there.
| | 00:59 | As you might know, your store, like
all Drupal sites, is a combination of
| | 01:03 | files and database.
| | 01:05 | The way they're connected is slightly
different on your Web host from your
| | 01:08 | home computer, so we'll have to edit some
folder names and text files to make it work.
| | 01:13 | The whole process happens in four steps;
| | 01:16 | the first step is to back
up the database and files.
| | 01:19 | Of course, this isn't actually
necessary to get the files onto your other
| | 01:23 | computer on the Web host, but it is
necessary in general, because there's a very
| | 01:27 | good chance that you'll need to roll
back the first time that you do this.
| | 01:31 | The second step is to specify how the
files and database will connect to each
| | 01:35 | other, and you do that in a settings.php file.
| | 01:39 | The third step is to upload the files,
the fourth is to upload the database, and
| | 01:44 | if everything goes right,
it should all work just fine.
| | 01:47 | First, we'll make a copy of our site.
| | 01:49 | I go to where I have it, in my case on the
Desktop, and simply copy it, and paste it.
| | 01:54 | I'll then give it an obvious
name; let's say twotrees-BACKUP.
| | 02:02 | I now have to back up the database.
| | 02:04 | To do that, I'll go to Acquia Dev
Desktop, which you'll remember is how we are
| | 02:07 | developing our site on the Desktop.
| | 02:10 | I click Manage my database.
| | 02:12 | That brings us to the phpMyAdmin program.
| | 02:14 | Over here, you see a list of databases, and
if you click Databases, you see the same list.
| | 02:19 | I am going to export the entire
twotrees database by clicking Export, selecting
| | 02:25 | twotrees, and then taking a
look over at the options here.
| | 02:30 | They get quite complex, and
I won't go into any of them.
| | 02:33 | If you have any problems with importing
your database later, I'd suggest that you
| | 02:37 | talk with your Web host.
| | 02:38 | For example, the Web host that I am
using doesn't allow me to actually create a
| | 02:42 | new database on the server,
| | 02:44 | so I'll have to go out and
edit the file that this creates.
| | 02:47 | Go down to the bottom, Save as file,
and I'll save it as an uncompressed file.
| | 02:53 | The file, as you can see, is now downloading.
| | 02:55 | When it's complete, I go back to its
download location, which in my case is the
| | 02:59 | Desktop, and there it is.
| | 03:01 | I am going to rename this as twotrees.
| | 03:03 | Then I'll also make a copy of that.
| | 03:06 | Copy it, and paste it, and call
that twotrees-BACKUP. Great!
| | 03:13 | So we now have our folder right
here, twotrees, and twotrees.sql.
| | 03:20 | So we now have our files and database ready.
| | 03:23 | Now we'll move on to our next step;
| | 03:25 | changing them to account
for the new environment.
| | 03:28 | You might have to change the name of
the folder containing site-specific
| | 03:31 | files if your host doesn't
recognize the one twotrees, and there are
| | 03:34 | typically two options.
| | 03:36 | It could be the name of your
site's domain, in this case
| | 03:39 | tgeller.webfactional.com, or you can
usually just use default in most cases.
| | 03:44 | So that's what I'll do just to keep it simple.
| | 03:46 | Inside of twotrees, in our sites folder,
we have this default folder, which hasn't
| | 03:51 | been used up until now. And then we
have twotrees, which is where we have our
| | 03:55 | actual settings.php file, and all of
the files that we've been using so far.
| | 04:00 | What I'm going to do is change
default, to default-OLD, and then change
| | 04:07 | twotrees simply to default.
| | 04:11 | The next step is changing how our
program files connect to the database itself.
| | 04:15 | One big difference among hosts
is how they handle databases.
| | 04:19 | I've already created my database with the
name tgeller_twotrees, and the password drupal.
| | 04:26 | We'll also have to change how our
program files connect to the database.
| | 04:30 | One big difference among Web
hosts is in how they handle databases.
| | 04:34 | I've already created my database with the
name tgeller_twotrees, and the password drupal.
| | 04:41 | To tell Drupal how to find that database
on the Web host, we change some text in
| | 04:45 | the settings.php file that's inside
the folder that I just showed you.
| | 04:49 | So to go there, we open
twotrees, and sites, and default.
| | 04:53 | Before I make any changes, I am
going to copy it, and back it up.
| | 04:59 | The next thing I have to
do is to unlock this file.
| | 05:02 | Go to settings.php, and go down to Properties.
| | 05:05 | On the Mac, you'll hit Command+I to change this.
| | 05:08 | Turn off Read-only, Apply, and OK.
| | 05:11 | Now we can edit it.
| | 05:15 | There are a few places the
database settings could be;
| | 05:18 | one of them is fairly near the top.
| | 05:20 | You have a listing here of all of the
information on how database settings happen.
| | 05:25 | Immediately after that is the
database setting itself, but in this case, it
| | 05:29 | doesn't show up there.
| | 05:30 | So I am going to comment that out, and
then scroll all the way to the bottom.
| | 05:36 | This is where Acquia Dev Desktop
puts it; at the end of the file.
| | 05:40 | If you use any other sort of AMP stack,
such as WAMP or MAMP, you'll find the
| | 05:44 | database settings in that earlier place.
| | 05:46 | Since we're in Drupal 7, we could
comment out the Drupal 6 part, and then I am
| | 05:50 | going to make a few other changes.
| | 05:52 | First, I'll comment out this base_url,
which is specific to the way that we were
| | 05:56 | developing on our Desktop machine.
| | 05:58 | You see it, that twotrees:8082.
| | 06:01 | Next, I am going to
change three things down here;
| | 06:04 | the first will be the database.
| | 06:06 | You might remember that the database
I am using is called tgeller_twotrees.
| | 06:13 | The username is also tgeller_twotrees.
| | 06:17 | Of course, you're going to change this
to whatever your Web host has, or however
| | 06:20 | you set up your database, and the
password is going to be simply drupal.
| | 06:25 | Now I'll save this, and close it up.
| | 06:29 | I mentioned a little bit earlier that
I'd have to make a change to the database
| | 06:32 | itself in order to make it
work on my particular Web host.
| | 06:36 | I'll open it up, and remove this CREATE
line, because as I say, my particular host
| | 06:42 | doesn't let me create databases directly.
| | 06:44 | So I already created mine, and then
I'm going to import all of this stuff in.
| | 06:50 | I'll comment that out, and the
USE line becomes tgeller_twotrees.
| | 06:56 | That's a lot of stuff, and hopefully
you won't have to go through all of this.
| | 06:59 | I'm showing you all of this, however,
because many of these steps are what trip
| | 07:03 | people up when they go on to launch their site.
| | 07:06 | However, now we can go on.
| | 07:08 | We'll start by moving over the files.
| | 07:10 | That's this folder here: twotrees.
| | 07:12 | I've already downloaded an
FTP program called Cyberduck.
| | 07:16 | You can get it yourself
by going to cyberduck.ch.
| | 07:21 | It's free, and there's a
version for both Mac and Windows.
| | 07:24 | So I'll open that program up again,
and I'm already at the place where I am
| | 07:29 | going to put everything.
| | 07:30 | I open my folder, and copy everything over.
| | 07:34 | There is one thing that you
have to watch out for, however.
| | 07:37 | In some operating systems, you can't
see any file that begins with dot;
| | 07:41 | that's .htaccess, and .getignore.
| | 07:45 | In general, that won't cause you a
problem, but if you're able to show those
| | 07:48 | files on your computer, do so, because you
need to be able to copy them over to your server.
| | 07:53 | So I've started that process,
which is going to take a while.
| | 07:58 | Now that the files are there,
we'll move the database.
| | 08:01 | Again, this is a step that
varies tremendously from host to host.
| | 08:05 | Fortunately, my host offers the same
graphical database interface as the Acquia
| | 08:09 | Dev Desktop we use on our home computer.
| | 08:11 | That is phpMyAdmin.
| | 08:13 | I've already logged in on my Web host, and we
see here the databases that we have available.
| | 08:18 | I've previously created tgeller_
twotrees, which remember is the database we
| | 08:23 | specified in our settings.php file.
| | 08:26 | If I click it, we see that there's
actually nothing in that database; no
| | 08:29 | tables found in database.
| | 08:31 | That's fine, because that's exactly
what we're going to import from our file
| | 08:34 | that we saved earlier.
| | 08:36 | So we click Import, we choose the file,
we left it on the Desktop, and there it
| | 08:43 | is. Open, and we make sure everything is okay.
| | 08:47 | Now, in this case, there is an issue.
| | 08:49 | You see that the maximum size for
the database allowed is only 2 megs.
| | 08:53 | This is a common problem on many Web hosts.
| | 08:56 | If I go back to my Desktop, and take a
look at my database file, it's actually 6 MB.
| | 09:01 | There are several ways around this.
| | 09:03 | One of them is particularly easy.
| | 09:05 | You'll notice that phpMyAdmin on my Web host
allows us to use compressed files; gzip, or zip.
| | 09:10 | So what I'll do is I'll go
back here, and I'll zip this.
| | 09:14 | I have a program called 7-ZIP,
which will let me do that easily.
| | 09:21 | If I go over and look at the compressed file,
it's less than a megabyte. Now, we can go.
| | 09:26 | So I switch back to phpMyAdmin, choose
the file, in this case, I want the ZIP
| | 09:31 | one, open it, and go.
| | 09:34 | This may take a while.
| | 09:36 | Once our database has finished uploading,
with all luck, our site should work.
| | 09:40 | Let's go and take a look.
| | 09:42 | You might remember it's at
tgeller.webfactional.com.
| | 09:46 | I'm afraid it doesn't.
| | 09:47 | There are still a few more things to check.
| | 09:50 | Let's go back to our phpMyAdmin
screen, and see exactly what that might be.
| | 09:56 | So what I'm going to do is look at my
phpMyAdmin screen, and see if there are
| | 10:00 | some settings that don't match
between this, and the settings.php file.
| | 10:04 | Remember, the settings.php file is
what ties your database to your files.
| | 10:09 | So let's take a look.
| | 10:10 | You could look at this on your local
machine, make changes in the settings.php
| | 10:14 | file, and then re-upload it.
| | 10:16 | I prefer to do it directly on the Unix server.
| | 10:18 | I just find it faster.
| | 10:19 | So I am going to use some Unix
commands here to look at what I have.
| | 10:23 | First, I'll see
everything in my twotrees folder.
| | 10:26 | This is my Drupal installation, and
you'll notice that there is a sites
| | 10:29 | folder right there.
| | 10:30 | I'll go into it; cd sites.
| | 10:33 | And the folder that we were using
is default; cd default, and there's
| | 10:37 | my settings.php file.
| | 10:39 | I made some other changes
while I was playing around.
| | 10:42 | You might remember I made a copy of the
settings file, but the one that Drupal
| | 10:45 | actually looks at is settings.php.
| | 10:48 | I'll open that up, and see what we have.
| | 10:52 | Scroll all the way down to the bottom
where our database settings are. Let's see.
| | 10:56 | The driver is correct, mysql, database, and
username, and password; we checked all those.
| | 11:01 | The two that are still in
question are host, and port.
| | 11:04 | So let's take a look again at phpMyAdmin,
and see what it says. Well, let's see.
| | 11:08 | Ah! Here's something;
| | 11:10 | instead of saying 127.0.0.1, it's localhost.
| | 11:13 | So I'll make that change, and again,
you might have to just do some of this
| | 11:16 | playing around on your own, depending on
what your host says, and then I want to
| | 11:22 | see if that port number is correct.
| | 11:24 | That's under the Variables.
| | 11:26 | I'll click there, and
search for port; 3306. Aha!
| | 11:32 | You see, it was 33066.
| | 11:34 | If I erase that, and exit,
now let's see if it works.
| | 11:39 | Go back to our site, and reload. We can see it!
| | 11:43 | We're almost there.
| | 11:45 | Obviously, it doesn't
look the way that we want to.
| | 11:48 | I am going to log in as the administrator,
which remember in our course is admin, and drupal.
| | 11:53 | And make one more important change;
| | 11:55 | when we were on our local machine,
Drupal made some assumptions about where
| | 11:59 | files would be stored.
| | 12:00 | Also, you might remember that we
changed the folder we were using from
| | 12:03 | twotrees, to default.
| | 12:05 | In order to make it see all of the
files, we have to go up and change that
| | 12:09 | in the file system.
| | 12:10 | You might not have to do this if you didn't
make that change from twotrees, to default,
| | 12:14 | but I'll just make that change here,
and here, and then this is a Windows path.
| | 12:20 | I am going to simply change it
to temp, and save configuration.
| | 12:23 | Now, if all worked correctly, when
I close this overlay, it should look
| | 12:27 | exactly as we want. Hold your breath.
| | 12:31 | And indeed it is! Our site
is back up, and it's working.
| | 12:35 | So to recap, moving your site to the
server is essentially a four-step process.
| | 12:40 | First, you back up the files, then you
make some changes to them, then you move
| | 12:45 | the files, then you move the database.
| | 12:47 | But the devil is in the details,
especially in that second step; make some changes.
| | 12:52 | So there's a good chance you'll have
to fiddle with settings, and then fiddle
| | 12:55 | with them again to make them work.
| | 12:56 | Again, I'm sorry; there's no way we can
cover the many variations here among the
| | 13:00 | hundreds of Web hosts out there.
| | 13:03 | If you're not able to work it out, your
best bet is to contact your Web host provider.
| | 13:07 | Good luck!
| | Collapse this transcript |
|
|
7. Increasing SalesOffering product discounts| 00:00 | If you're an experienced business
person, you already know that discounts
| | 00:03 | really spur people to buy.
| | 00:05 | Fortunately, creating
discounts in Drupal Commerce is easy.
| | 00:09 | Although, I have to say that I don't
care for the way it works by default.
| | 00:12 | So first I'll show you that way,
but then I'll show you another that I
| | 00:15 | think works a lot better.
| | 00:17 | Before we begin, let's take note of
the price of these Bath salts; it's $13.
| | 00:22 | To reduce that, we create something
called a product pricing rule. We saw rules
| | 00:26 | in action in several other videos.
| | 00:28 | If you want a refresher, watch the
Understanding Rules video earlier in this course.
| | 00:33 | To go there, we go up to Configure
store, then Product pricing rules, and
| | 00:37 | we'll Add a pricing rule.
| | 00:39 | I'm going to call this Flat 20% discount.
| | 00:46 | No need to add a tag; I'll just Save it.
| | 00:48 | Now, when you do that, the Event is set
up automatically; you don't actually have
| | 00:52 | to touch it, and the rest of this is
just a rule. It has conditions and actions.
| | 00:56 | The thing that we're going
to change is the actions.
| | 00:59 | We add one, and then we
have many options to choose.
| | 01:03 | The ones that you're going to want are
under Commerce Line Item, and there are
| | 01:06 | several options here.
| | 01:07 | For example, you could say, today
everything in the store is a dollar, by just
| | 01:12 | setting the price to a specific amount,
or you can multiply it, or divide it, or
| | 01:17 | subtract a dollar from everything;
whatever you want, but what we're going to do
| | 01:20 | is multiply the unit price by some amount.
| | 01:23 | We'll do that, and the Value is going to
be 0.8, because multiplying a price by
| | 01:27 | 0.8 is the same as removing 20%.
| | 01:31 | Under Value, there are a few different
options. I'm going to choose Discount.
| | 01:35 | There is some subtle differences among
them, and you can read about that in the
| | 01:37 | documentation, and then I'll say Save.
| | 01:41 | Now let's see how that
works from the buyers view.
| | 01:44 | Go back to our front page.
| | 01:45 | Aha; you see now it's priced to $10.40
instead of $13, so it worked, but let's
| | 01:50 | go through the whole process.
| | 01:52 | First I'm going to go to my cart, and
remove what's their already, just to be sure
| | 01:55 | that we're starting from scratch.
| | 01:57 | Then I'll add this, we see it in the
cart, it shows as $10.40; we checkout.
| | 02:03 | Now this is where it gets a little weird,
and why I prefer to use my alternate method.
| | 02:07 | It shows that it's $10.40 here,
but then the subtotal doesn't match.
| | 02:11 | So even though people are paying the
correct amount, they don't really know
| | 02:14 | why they're paying it.
| | 02:15 | What we're going to do is sort of a
hack, but I think it works a lot better.
| | 02:19 | It essentially applies a negative tax
to the item. That will give your customers
| | 02:23 | a discount experience that I think is
more like what you're used to seeing.
| | 02:27 | Before I do, I just want to take a
moment to thank well-known Drupal Commerce
| | 02:30 | administrator Randy Fay for uncovering
and evangelizing this method, which has
| | 02:34 | helped out a lot of people, including me.
| | 02:37 | So the first thing we're going to do
is go up and configure our store, and
| | 02:40 | get rid of that product pricing rule. Flat 20
% discount; we'll simply delete, and confirm.
| | 02:46 | Now if we go back to our cart, by
the way, we see that it's updated.
| | 02:51 | Go back to the front page, and the
page shows correctly as $13. Very good.
| | 02:55 | I'm just going to remove what's in the
cart now, so we can start again from scratch.
| | 03:00 | Now let's go on to creating
that negative tax.
| | 03:02 | We go up to Configure store, go down to Taxes,
and under Tax Rates, I'm going to Add a tax rate.
| | 03:12 | The Title will be 20% discount, I'll
copy that and paste it in the Title as well,
| | 03:18 | and then for the Rate, I'll make it -0.2.
| | 03:22 | Remember, instead of
multiplying by 0.8, we're subtracting 20%.
| | 03:27 | Go down, sales tax is correct, and save.
| | 03:31 | Now let's see what that looks like to our user.
| | 03:33 | Close out the overlay, front page reloads,
now we see this is $13; so far so good.
| | 03:40 | Add to cart, view the cart, it's
still showing as $13 and Checkout.
| | 03:46 | Now at this point, we get the 20% discount.
| | 03:50 | I think this is a better way to do it,
because you could advertise 20% off of
| | 03:54 | everything taken at checkout,
| | 03:56 | and it's much easier for people to understand.
| | 03:58 | Now I'd like to go one step further,
and limit this discount, so it's only
| | 04:01 | available for a limited time.
| | 04:03 | We can do that by fixing
up the rules a little bit.
| | 04:06 | First, we'll have to step back a bit.
| | 04:08 | We'll go up and configure the tax by
going to Configure store, and Taxes.
| | 04:13 | So far, I made this an ordinary sales tax.
You might remember, we have two kinds
| | 04:17 | of tax types: sales tax, and VAT, and I just
sort of piggybacked on to the regular sales tax.
| | 04:22 | I'm little uncomfortable about that,
because now when I start to make changes
| | 04:25 | to that tax type, it could get confusing, and
it could affect our regular taxes, and so forth.
| | 04:30 | So I'm going to create a new tax type.
| | 04:34 | The tax type is going to be
called 20% discount as well.
| | 04:41 | And here you'll notice you have some
other options as to what you can do to
| | 04:44 | round dollar amounts. I'll Save that, and
then go back and take a look at my tax rates.
| | 04:49 | You could either click this tab,
or just click Taxes over here.
| | 04:53 | Now I'll go back into a
20% discount and edit it.
| | 04:57 | Instead of being a sales tax, it will
be a 20% discount type tax, and save it.
| | 05:02 | Again, this is mostly just housekeeping,
but it's the sort of thing you should
| | 05:05 | be thinking of while you build your site,
so you don't muddle up your different
| | 05:07 | tax rates, but this works
exactly as it did before.
| | 05:11 | Now here is how you limit it by time.
| | 05:14 | We'll go into Tax Types, into our 20
% discount, and this time we're going
| | 05:18 | to configure the rule.
| | 05:20 | I'll add a condition, and then
we'll make a data comparison.
| | 05:24 | We're going to say, we only want this to be
true until, let's say, December 31st of 2012.
| | 05:29 | So for our condition, what we want to do
is compare today's date to the last date
| | 05:34 | that we offer this discount.
| | 05:36 | For that we need a data comparison.
| | 05:38 | This is where it gets a little
tricky, but we have some help under this
| | 05:41 | Data Selectors link.
| | 05:43 | We click it, and we see that we
have all sorts of options here.
| | 05:47 | The one that we want is date, so I'll
do a search on my page for date, and
| | 05:52 | that looks pretty good.
| | 05:53 | We want to compare the
current date to a specific date.
| | 05:57 | So I'll copy that, go up to my Data selector,
and paste it in, and then click what it offers.
| | 06:06 | Scroll down to the bottom, and continue.
| | 06:10 | Now we have the option of saying,
what do we want to compare it to?
| | 06:14 | We want it to be lower than 2012-12-31,
and we could just leave the time however
| | 06:25 | we want. I'm just going to change it
to 23:59:59, in other words, midnight on
| | 06:31 | that day, and then save. Great!
| | 06:36 | Now let's go back and take
a look at how that looks.
| | 06:40 | If we take a look in our checkout again,
just to go back and go straight to it;
| | 06:44 | yep, we still have the discount.
| | 06:46 | We can prove that this is working by
going back, and changing that data comparison.
| | 06:50 | Change it so that, for example, the
sale ended yesterday, so let's do that.
| | 06:55 | We go up to Configure store, down to
our Taxes, to our Tax Types, and there
| | 07:01 | is our 20% discount.
| | 07:02 | When we configure this rule, we can just
go back and change that data comparison.
| | 07:06 | So we click edit to change the data
comparison, and we scroll down to our data value.
| | 07:11 | You'll notice something unusual here:
even though I entered at midnight on New
| | 07:16 | Year's Eve of 2012 going into 2013,
it moved it ahead by eight hours.
| | 07:22 | Why would it do that? Ah!
| | 07:24 | You see, I made a mistake.
| | 07:25 | This is the date in GMT, and it actually
changes it based on whatever your time zone is.
| | 07:31 | Since I'm recording this in
California, eight hours away, it changed it.
| | 07:35 | So watch out for that whenever you do
one of these data comparisons with a date.
| | 07:39 | Anyway, I'm going to change it back to 2010,
which is definitely not happening anymore.
| | 07:47 | We'll go back in; ah, and
it removed the discount.
| | 07:51 | Did you see that when the screen refreshed?
| | 07:52 | It's now back to $13.
| | 07:54 | Once you know about data comparisons,
there are lots of ways you could limit
| | 07:58 | purchasing opportunities.
| | 08:00 | One of the most intriguing ways to
provide discounts is by offering them only to
| | 08:04 | people who are active on your
website, or who perform certain tasks.
| | 08:08 | You do that by installing the user
points module, which is available at
| | 08:12 | drupal.org/project/userpoints.
| | 08:16 | Basically, any module that integrates
with rules provides possibilities for
| | 08:20 | discounts, and there are a lot of them.
| | 08:23 | You can see how many there are by
going to drupal.org/project/rules.
| | 08:25 | Now once you're there, scroll down
until you see, under Further resources, this
| | 08:32 | Modules supporting rules.
| | 08:34 | There is a huge list, and all of
these give you opportunities for offering
| | 08:39 | discounts, only based on certain comparisons.
| | 08:42 | This is one of the better
developed areas of Drupal Commerce.
| | 08:45 | It was a real stroke of genius for
them to use rules as the basis for
| | 08:48 | things like discounts.
| | 08:50 | In short, you can make pretty much
any activity on your Web site the
| | 08:54 | qualification for discounts.
| | Collapse this transcript |
| Gaining insight from Google Analytics| 00:00 | The early days of the Web vexed
traditional marketers, because they weren't able
| | 00:04 | to measure the effectiveness
of what they were doing.
| | 00:06 | That changed in the early 2000s when
Web analytics software started to appear.
| | 00:11 | Then it solidified in 2005 when Google
got in the game, and they pretty much
| | 00:15 | owned it with Google Analytics.
| | 00:17 | It's quite easy to install the Drupal
modules if you need to use Google Analytics.
| | 00:21 | Before you can use it, though, you have
to have a Google account to receive the
| | 00:25 | information that your site collects.
| | 00:27 | I won't show you that part; you can
learn about it from the lynda.com course,
| | 00:31 | Google Analytics Essential Training.
| | 00:33 | This video shows you
everything else that you need to know.
| | 00:36 | First, let's go to the Google Analytics site.
| | 00:38 | You do that at google.com/analytics,
and I'll just log in with my own account.
| | 00:50 | That starts the Google Analytics part.
| | 00:52 | Next, we'll need to get the Google
Analytics module, which is the glue between
| | 00:56 | your Drupal Commerce store, and Google.
| | 00:58 | To get that, we'll go to drupal
.org/project/google_analytics.
| | 01:04 | We'll go down here, and we'll
install it in the usual way.
| | 01:25 | We then enable the module.
| | 01:35 | You'll find it down toward the bottom
under the Statistics group, and then you save.
| | 01:41 | Once you've done that, you'll start to
notice a warning as you go around your site.
| | 01:45 | If we go to our Status report,
we see what it is.
| | 01:48 | Google Analytics requires that you
enter your Google analytics code, which
| | 01:52 | goes up right here.
| | 01:54 | For that, we have to go back to our
Google Analytics site, and get that code.
| | 01:58 | Now, here I have to warn you about something.
| | 02:01 | You won't be able to use Google Analytics
on a site that you haven't yet launched,
| | 02:05 | so we actually can't do it on our Two
Trees site here, because it doesn't have
| | 02:09 | an actual URL; it's just on our
desktop machine, twotrees:8082.
| | 02:13 | We'll try to do that.
| | 02:15 | I'll go down to my gellerguides
group here, and add a new profile.
| | 02:19 | It asks me for the URL.
| | 02:21 | If I were to say simply twotrees:8082,
which is what we have back here, remember?
| | 02:28 | And finish; it tells me that I
have to correct the errors, because it
| | 02:32 | wasn't able to find that.
| | 02:33 | Now, it's actually asking, did
you actually mean gellerguides?
| | 02:36 | So let's try a new domain.
| | 02:37 | Yup, and you see, URL ends with an
invalid -- so it's just not seeing that.
| | 02:42 | So instead of using this site, we're
going to use the one that we uploaded
| | 02:46 | earlier on in the Launching Your Store
video. That one I happen to have at
| | 02:50 | tgeller.webfactional.com, and once
again, I have to install the module.
| | 02:54 | So go to Modules, Install, and exactly as before.
| | 03:11 | Now we can use it.
| | 03:12 | To configure it, I go to Configuration,
and again, I can follow these links
| | 03:15 | through the Status report, or
just click here on Google Analytics.
| | 03:19 | Now I'll go back to Google
Analytics, and get my code.
| | 03:22 | I want a new domain; that's going to be
tgeller.webfactional.com, and continue.
| | 03:33 | Now I have my code.
| | 03:35 | This is the part you actually need.
| | 03:37 | You could ignore the rest of this stuff,
because this is actually built into the
| | 03:40 | module that you put in to your Drupal site.
| | 03:41 | So I'll just copy this UA code here,
go back to my site, yup, it's the
| | 03:46 | webfactional one. Paste it, and save.
| | 03:53 | Now, we're ready to go.
| | 03:55 | Now, I skipped over an awful
lot when I went through that.
| | 03:58 | You have a lot of options down
here at the bottom of the page.
| | 04:01 | You can track according to
domains, pages, roles, and so on.
| | 04:07 | You'll notice that some of these
exceptions are already built-in.
| | 04:10 | It's set so that Google Analytics
won't track the things that you do as the
| | 04:13 | administrator, which is really good, because
otherwise you'd find a lot of false positives.
| | 04:17 | Oh, people are coming to my site;
| | 04:19 | no it's just you administering the site.
| | 04:21 | Let's go back to the Google Analytics
page, and see what it's reporting back.
| | 04:25 | Unfortunately, we're not
going to see anything yet.
| | 04:28 | It takes a little while for your site to
talk to Google Analytics, and for Google
| | 04:31 | Analytics to respond, but
let's take a look anyway.
| | 04:34 | We'll go back up to the top level, and
see what's under our gellerguides group.
| | 04:40 | There it is; tgeller.webfactional.com.
| | 04:43 | Now as I say, it's not reporting it,
but otherwise, you would see a report here
| | 04:47 | showing exactly who's on your site,
how much time they've spent, what pages
| | 04:51 | they go to, and so forth.
| | 04:52 | So to give you an idea of what that
actually looks like, I'm going to show you
| | 04:56 | the analytics from my own site, tomgeller.com.
| | 05:04 | To do that, I'll go back up to Analytics.
| | 05:06 | So, here you can see that Google
Analytics shows you a lot of information.
| | 05:10 | It tells you on a day by day basis
how many people came to your site, shows
| | 05:15 | geographically where they're coming
from, and you can actually drill down in
| | 05:17 | here, and see a closer report for
any part of this. Very useful stuff.
| | 05:22 | Again, for more information on this, see
Google Analytics Essential Training from lynda.com.
| | 05:27 | This whole field of analytics is just
fascinating stuff, and with the Google
| | 05:31 | Analytics module installed and
configured on your store, you can see a lot about
| | 05:35 | what on your site most interests people,
and it's broken down by demographics, and
| | 05:40 | you can use that information to
increase sales and target your marketing.
| | Collapse this transcript |
| Making your site more visible to search engines (SEO)| 00:00 | Now that your site is up,
you want people to find it.
| | 00:03 | Advertising takes you part of
the way, as does participation in
| | 00:07 | relevant communities,
| | 00:08 | but a big part of online traffic is from
what they call organic search. That is,
| | 00:12 | through search engines like Google, and Yahoo!.
| | 00:15 | The techniques I will teach you in this
video will help you get higher on their listings.
| | 00:20 | But let's be honest, the world of
search engine optimization, or SEO as it's
| | 00:24 | usually called, started
out in pretty bad company.
| | 00:28 | People used all kinds of dirty tricks
to knock others out of the top places.
| | 00:32 | But standards have emerged in the
last few years that the search engine
| | 00:35 | companies actually encourage.
| | 00:36 | They improve your site's
appearance, not just its ranking,
| | 00:39 | so you can feel good about using
everything you see in this video.
| | 00:44 | First, there are a few
modules that are must haves.
| | 00:47 | The first module is called Token, and you
can get it at drupal.org/project/token.
| | 00:52 | What this does is let you put into
your site information from the site itself.
| | 00:57 | For example, you could put in a
token that says name the current user, or
| | 01:02 | name the current page.
| | 01:03 | This is useful for SEO purposes.
| | 01:06 | You would download and install this in
the usual way by going down here, copying
| | 01:09 | the link, and pasting it in
through your modules page.
| | 01:13 | The next one is called Path Auto.
| | 01:15 | Like Token, it's at drupal.org
/project, but then pathauto.
| | 01:20 | What this does is it changes the path
that shows up as the URL alias up here.
| | 01:25 | If we go back to our site, you might
remember that when we create something in
| | 01:28 | our site, it gives it this path of node/21.
| | 01:32 | That doesn't actually say
anything about what's on the node.
| | 01:35 | You can change it manually by going to
the node, clicking Edit, and scrolling
| | 01:39 | down to URL path
settings, and setting it by hand.
| | 01:43 | What Path Auto does is it automatically
creates those paths for you based on the
| | 01:47 | content of the node.
| | 01:48 | Very useful, and it shows off your
site a lot better to search engines.
| | 01:52 | I am actually going to install this one.
| | 01:54 | I will go down, copy the link, go
back to the site, and as usual, it's just
| | 02:00 | Modules, and Install new
module. Then we enable it.
| | 02:08 | To find it quickly, I will simply
search on my page for pathauto.
| | 02:12 | Ah, you remember that Token module?
| | 02:13 | It's actually required by pathauto, so I
will go back, and I will install that as well.
| | 02:19 | Again, drupal.org/project/token.
| | 02:36 | Now we can enable Path Auto, and when we do,
| | 02:44 | by the way -- this is a nice feature of
Drupal -- it automatically says, oh you also
| | 02:48 | need to have Token enabled.
| | 02:49 | So yes, go ahead and do that.
| | 02:51 | You only have to enable the
last one in the chain, so to speak.
| | 02:55 | You can see how those URL aliases work
by going up to Configuration, and then
| | 03:00 | down to URL aliases.
| | 03:03 | We now have this tab up here, Patterns,
and this is how you define what that
| | 03:07 | automatic path is going to be.
| | 03:10 | You can define it by taxonomy, by
user; all sorts of options in here.
| | 03:14 | There's also some settings, a
bulk update option, and so forth.
| | 03:17 | If we go back to our node, we
can see what that does for us.
| | 03:21 | We go in and we Edit it.
| | 03:24 | Scroll down to our URL path
alias, and make it an automatic alias.
| | 03:27 | Now, instead of being simply node 21,
it gives us bath-salts-8-cubes.
| | 03:34 | Very good for search engines.
| | 03:36 | That's an important first step;
| | 03:38 | possibly the most important thing you
can do quickly, because that URL is so
| | 03:42 | important to search engines.
| | 03:44 | But now let's move on to some
suggestions from the Drupal community.
| | 03:48 | I've found a large list that I really
like at groups.drupal.org/node/141519.
| | 03:57 | There's a lot here, and this is a wiki page,
which means people are always adding more to it.
| | 04:02 | The good news is that an SEO expert
named Ben Finklea created a Drupal module
| | 04:07 | that takes this big confusing
wiki page, and helps you apply its
| | 04:10 | recommendations to your site.
| | 04:12 | It's in a module called SEO Checklist.
| | 04:15 | You go to drupal.org/project/seo_checklist.
| | 04:21 | We will download and enable that.
| | 04:43 | Then we can see what it does by going to
Configuration, and down to SEO Checklist.
| | 04:48 | I won't go into all of the details here,
but as you can see, it gives you a lot
| | 04:52 | of different choices of what you can check off.
| | 04:55 | But the funny thing about this module
is that checking these things doesn't
| | 04:58 | actually do anything on your site.
| | 05:00 | It really is just a simple
checklist, as if it's on a piece of paper.
| | 05:04 | But Ben Finklea and his folks at
Volacci are always updating this,
| | 05:07 | so it's a very useful thing for
keeping up on all of your best search engine
| | 05:11 | optimization practices.
| | 05:13 | As you can see, there are a lot of ways
to improve SEO for your Drupal store.
| | 05:18 | But the truth is, even if you do none
of these things, your site is going to be
| | 05:22 | in pretty good shape already, because
Drupal has several built-in SEO features.
| | 05:27 | SEO is a competitive field,
though, and every little bit counts.
| | 05:32 | Earlier in the video I mentioned a
few resources that will take you further
| | 05:35 | within Drupal, but if you want to learn
more about SEO in general, I recommend
| | 05:39 | searching lynda.com for the phrase SEO
to find several courses on the subject.
| | 05:44 | Two of the biggest ones are SEO:
| | 05:45 | Search Engine Optimization Getting
Started, and Analyzing Your Web Site
| | 05:49 | to Improve SEO.
| | Collapse this transcript |
| Encouraging customer buzz| 00:00 | Nothing powers a store better than word-
of-mouth. That's especially true on the
| | 00:04 | Internet, where shoppers can multiply
their opinions through social platforms such
| | 00:08 | as blogs, forums, Facebook, and Twitter.
| | 00:12 | That list names only a few. It's
impossible to catalog all the ways that people
| | 00:16 | spread opinions online, and their
number will continue to increase,
| | 00:20 | so this video introduces you to some
that are fairly easy to implement, but that
| | 00:24 | can have big payoffs.
| | 00:26 | Let's start by talking about
something very natural to your site.
| | 00:29 | Whenever someone makes a purchase on it,
Drupal Commerce creates a user, and
| | 00:33 | if we go up to People, you'll remember that
we have this customer@example.com person.
| | 00:39 | This one was created when
that person made a purchase.
| | 00:42 | We can go in and edit their profile,
and as we go down, you see that we can do
| | 00:46 | things like let them add a picture,
select their location, and also, if we go up
| | 00:52 | to Configuration, and Account settings,
we can add any other fields that we want
| | 00:58 | to, so that people can express
themselves through their profiles.
| | 01:02 | What people do with those profiles,
you can change by changing their
| | 01:05 | Permissions settings.
| | 01:06 | To do that, go up to People, and Permissions.
| | 01:09 | There is a lot to go through here, and
you can learn more about it in my Drupal 7
| | 01:14 | Essential Training course, but the
most important one is down at the bottom.
| | 01:19 | In this User group, if you let people
view each other's profiles, that's the
| | 01:23 | beginning of community.
| | 01:24 | There are a few other permissions on
this page, which allow them to contact each
| | 01:27 | other, and so forth, and as you add
other modules, you might have more and more
| | 01:32 | ways that people can interact with
each other, but this is a beginning.
| | 01:36 | Moving away from people, let's talk
about one social feature that's built into
| | 01:40 | your store, but is turned off
by default. That's the Forums.
| | 01:43 | Let's go and turn it on by going up to
Modules, and scrolling through the Core
| | 01:47 | group until we find Forum.
| | 01:51 | Turn it on, scroll to the bottom, and save.
| | 01:56 | That creates an entire
bulletin board system on your site.
| | 02:00 | We can see how that works by
going up to Structure, and Forums.
| | 02:04 | It starts already with General
discussion group, and you could add subgroups if you
| | 02:08 | like, but let's just go there.
| | 02:11 | Once there, you can add a topic, say
Favorite recipes, and if you had added other
| | 02:17 | forums, you could put that into a
recipes area, or an edible oils area, or
| | 02:22 | whatever you want. You can change
the taxonomy of this however you like.
| | 02:25 | Let's talk about them. Scroll down, and
save it, and as you can see, people can
| | 02:32 | then comment on it, and so forth.
| | 02:34 | Once again, you'll have to set the
permissions correctly, but this gives you an
| | 02:36 | idea of the power of Drupal behind your store.
| | 02:40 | Now, there is a problem with forums, though.
| | 02:42 | They can become hives for abuse, and trash
talking, so you have to watch them carefully.
| | 02:48 | However, if they're done right, they
can become a reason that people keep
| | 02:51 | coming back to your store.
| | 02:54 | One place that I think does that
really well is woot.com, at woot.com.
| | 02:59 | Woot sells one item a day, and then
they have special deals as well, but the
| | 03:03 | centerpiece is the community, and you
can see that there are lots of discussions
| | 03:07 | about what's being sold, and how
to win it, and that sort of thing.
| | 03:10 | Very good use of community using
forums, but let's get back to our site.
| | 03:15 | Another way to keep people coming
back is to write an interesting blog.
| | 03:18 | There is a blogging system already
built into your store, but like the Forums,
| | 03:22 | it's turned off by default.
| | 03:24 | To turn it on, go up to Modules, and
in the Core group, it's simply Blog.
| | 03:29 | Scroll to the bottom, and save.
| | 03:33 | Blog posts are just ordinary pieces of content.
| | 03:36 | You create them by going up to Content, Add
content, and now you see you have Blog entry.
| | 03:43 | Let me put something in here;
| | 03:45 | I love olive oil, and let me tell you about it.
| | 03:50 | Scroll down to the bottom to Save.
| | 03:52 | I'm just going to take this off of the
front page; let's say I don't actually
| | 03:55 | want to have all of my
blog posts on the front page.
| | 03:58 | I'll save it, and there it is, and as
with most blogs, people can then add
| | 04:05 | comments, and so forth.
| | 04:07 | One thing that's interesting about
blogs is that they all get collected onto
| | 04:10 | one page, so someone could just go to my
admin's blog, and read all of my blog posts.
| | 04:16 | Now, Forums and Blogs are just built-in features.
| | 04:18 | You get them automatically with Drupal,
but because your store is built on
| | 04:22 | Drupal, you can also add all sorts of
community features from the wealth of free
| | 04:26 | modules at drupal.org.
| | 04:28 | To go there, go to drupal.org/projects/modules.
| | 04:33 | Once there, the first thing you need
to do is filter it by compatibility.
| | 04:36 | We're using Drupal 7, and modules for
other versions of Drupal won't work.
| | 04:41 | Then you can search by category, as well.
| | 04:43 | For example, Community.
| | 04:45 | There's over 100 modules available,
which will help you build your community.
| | 04:50 | So that covers a lot of the things that
you can do to encourage people who are
| | 04:54 | already existing customers to talk
to each other, but if your goal is to
| | 04:58 | increase business, you also have to
make your store talk to other sites.
| | 05:03 | We talked about one way to do that in
another video in this series, Making Your
| | 05:06 | Site More Visible to Search Engines.
Now let's look at a few other techniques.
| | 05:11 | One of those techniques is already built into
your store, but it's not very well promoted.
| | 05:15 | Let's go back to our
store, and to the front page.
| | 05:17 | Now, if you scroll to the bottom,
you'll notice this little icon here. This
| | 05:23 | leads to an RSS feed.
| | 05:25 | If we click it, we see the contents
of this page, and remember, this is a
| | 05:29 | collection of nodes showing
up in a format known as RSS.
| | 05:34 | Other sites can subscribe to this,
and show your content, and it appears
| | 05:37 | immediately as you post it,
or within a very short time.
| | 05:41 | Now, I'm using Google Chrome.
| | 05:43 | If I switch over to Firefox, you'll see
that it shows the RSS information in a
| | 05:47 | slightly more human readable form,
but in either case, other computers can
| | 05:51 | understand it, and that's important,
because if some other site wants to show
| | 05:55 | everything that's happening, let's say, in
the olive oil world, they'll get your products.
| | 06:00 | Finally, I want to mention a way that
you can reach out to other sites where
| | 06:03 | your customers already gather. That
is, Facebook, and Twitter, and so forth.
| | 06:08 | There are several modules that add
buttons next to your products and blog posts,
| | 06:12 | so that people, when they like them, can
just click the Like, or the +1 buttons, and
| | 06:15 | it will automatically count on
Twitter, and Facebook, and so on.
| | 06:19 | One that I've used a lot is called AddThis.
| | 06:22 | You can get it at drupal.org/project/addthis.
| | 06:23 | We'll install this in the usual way.
| | 06:31 | Copy the link, go back to our
site, and put it in the Modules.
| | 06:51 | Once it's installed, you activate it
by going to Configuration, and AddThis.
| | 06:56 | I'm going to have the AddThis button
show up in both node pages, and node teasers.
| | 07:01 | I should mention, this username is if you
want to track the activity on your site
| | 07:05 | on the addthis.com site.
| | 07:06 | Obviously, we're not going to go into
that whole subject, but it is another way
| | 07:10 | that you can keep an eye on what
people are doing on your site, while still
| | 07:13 | giving them their anonymity.
| | 07:14 | Anyway, we'll save this, and then go
back to the front page of our site, and you
| | 07:20 | see now, next to every one of these
listings, we have this little button where
| | 07:24 | we can say, oh yes, I like this; I'm
going to send information about it by
| | 07:27 | e-mail, or I'm going to
put it on my Myspace page.
| | 07:30 | There are actually quite a few others
available; over 300, in case you use any of
| | 07:34 | these other social networks.
| | 07:36 | I'm going to just change that
configuration a little bit, because I don't like
| | 07:40 | having this on the front page.
| | 07:41 | As people scroll through, they tend to
get tripped up by these buttons, but I
| | 07:46 | want to leave it available
on the individual products.
| | 07:48 | So I'll go up to Configuration, back to
AddThis, turn it off for the teasers,
| | 07:53 | but leave it on the node pages.
| | 07:54 | There is one last thing about this
particular module. Although we can share
| | 07:59 | these items, you have to turn on
permissions for ordinary people to share them.
| | 08:03 | We go to People, and Permissions,
there's AddThis, and we let people view the
| | 08:10 | AddThis widget, and save.
| | 08:13 | A similar module, by the way, is
AddToAny, and you can get that at
| | 08:17 | drupal.org/project/addtoany.
| | 08:22 | Now, I know that was a
whirlwind tour of a big subject.
| | 08:25 | As usual, lynda.com has several
courses that will take you further.
| | 08:29 | First, see more about Drupal's built-
in features, such as Forums, by watching
| | 08:33 | Drupal 7 Essential Training. Then
consider looking at some of the business
| | 08:37 | courses, such as Social Media
Marketing with Facebook and Twitter.
| | 08:41 | Not everything in those courses will
be relevant to your store, of course, but
| | 08:45 | every little thing you can do to
encourage positive buzz will help you to
| | 08:49 | increase your customer
base, and improve retention.
| | Collapse this transcript |
|
|
ConclusionGoodbye| 00:00 | Thanks for watching Create Your
First Online Store with Drupal Commerce.
| | 00:04 | You're well on your way to running an
online store the way you want, free from
| | 00:08 | the restrictions and fees of
hosted services like Amazon, and eBay.
| | 00:12 | I hope you're as excited as I am about
all you can do with Drupal Commerce, and
| | 00:15 | I can't wait to see the
great things you do with it.
| | 00:18 | If you're still hungry for more
information, here are some resources.
| | 00:22 | First, there is the Drupal
Commerce homepage at drupalcommerce.org.
| | 00:27 | There you'll find many discussions about
all of the latest developments of the project.
| | 00:31 | As you know, Drupal Commerce is built on
top of Drupal, and for more information
| | 00:35 | about that, visit the Drupal
project's homepage at drupal.org.
| | 00:39 | Of course, to promote your store, turn to
lynda.com's courses in online marketing.
| | 00:44 | Just go to lynda.com, and
search for the word marketing.
| | 00:48 | I hope this course helps you
to become a happy and successful
| | 00:50 | online entrepreneur.
| | 00:51 | Thank you for watching Create Your
First Online Store with Drupal Commerce.
| | Collapse this transcript |
|
|