Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
One thing that a content management system like Drupal does is to compartmentalize your site's structure into logical patterns of information that are easy to work with. Drupal calls these entities. Now, describing entities can get a little bit confusing, and even metaphysical at times, but if you listen through it, you will find that you may understand your site's structure much better. In core Drupal, there are four kinds of entities: content, which Drupal calls nodes, users, categories, which Drupal calls taxonomies, and comments.
Let's just take a look at a node. By default, nodes have only two fields, a title, and a body. But when they're displayed, a node actually pulls in parts of other entities. For example, the name that gets connected with that node comes from the user entity. There may be tags at the bottom of that node; that comes from the taxonomy. And finally, Drupal allows people to comment on nodes, and those come from a different sort of data store; the comments entities. If you've used Drupal 7 before, this is all old-hat.
You can add fields to any kind of entity, and then reference them from other entity types. For example, you could add a picture to a person's profile, and then that could show up in the node. But back to Drupal Commerce. It adds several more entities. Besides the four that are in core Drupal, it also adds products, customer profiles, line items, and payment transactions. And most of these work pretty much the same as they do in core Drupal.
If I switch back to our site, I will show you that. First, let's look at core Drupal. If we go up to Structure, and Content types, and then take a look at Product display, we can change the fields that go into Product display pretty easily, and you have seen this already in this course. Similarly, if we go up to Store, and Products, we have Product Types. And once again, we can add fields to those. As we go on, we can configure our store, and look at our Order settings, and actually add fields to orders. So when somebody goes through the whole order process, you could make them for example, add additional information.
Let's say their age, if it's some sort of age restricted item that you are selling. These types -- content types, product types, and so forth -- are like templates. So if you're selling shirts, you create a product type that includes an image, and a field for color, and a field for size, or you might do that all through taxonomy, but once again, you are just adding fields to entities. And, as I mentioned earlier, Drupal Commerce often references one entity's field from another entity. That's why you are able to see product information in your product display nodes. And your product display nodes can also reference the person who created them, and so forth.
I know this is pretty conceptual stuff, but it will all become clearer the more that you work with Drupal Commerce, and having this understanding will help you to avoid becoming confused as you go forward.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 73876 Viewers
80 Video lessons · 129416 Viewers
52 Video lessons · 63754 Viewers
59 Video lessons · 49524 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.