Viewers: in countries Watching now:
This course shows how to build an online store using Drupal Commerce, a set of modules that extend Drupal. Author Tom Geller teaches the basics of configuring a store, processing a payment, and charging for shipping and taxes, as well as creating, displaying, and categorizing products. The course also explains how to integrate a store into a Drupal site, customize a store's appearance, and increase site traffic using search engine optimization (SEO) techniques.
Alas, nothing lasts forever, and for many types of salable items, it's possible to run out of stock. Certainly, that's true for physical items, like books, but it's also true for some non-tangible items, such as seats at a concert. Even if the item isn't truly limited, you might want to set an artificial limit to create scarcity. In any case, the way you do that is with the Commerce Stock module, which is available at drupal.org/project/commerce_stock. As usual, we'll go down, and download it, and enable it.
You'll find the module in the Commerce (Contrib) group on your Modules page, and then save. Once you've done that, you'll notice a new setting when you click Configure store. It's the Stock management; let's go there. We'll enable it for the only product type we have, which is Product, then click Submit. Now once we do that, we have an option to check a box here to allow stock override for a specific product. That means we can vary it from product to product.
I'm going to go ahead and say that yes, we want to do that, and submit again. Now before we go on, I'm going to go back and fill in a stock amount for all of those products that we already have. If we don't, nobody will be able to order them. I'll show you how with one, and then we'll just skip ahead, and I'll do those offscreen. To do so, go up to View products, and let's change Olive Oil. I'll edit it, scroll down a little bit, and there is our Stock. Now, you'll notice it's a required field. I'm going to say that we have 10 of those, and save.
Now that a checkbox there, Disable stock for this product, would let you say we have an unlimited supply of this thing. That's where the override came in. Now I'll go ahead and add stock for all the other products we have. Okay; I've recorded that we have five of each product in stock. Now let's see how that affects the ordering process. To do that I'll go home. I'm going to go to the front page, view my cart, and empty it out first. Great! I'll go back, and I'll order something. Let's make at this Hand cream.
I'll go through the whole process, view the cart, there it is, checkout; do all the usual stuff I would. I send it by Flat Rate, and my name, and continue on. Once again, we check everything. It looks good. My payment is right here, it's going to be my Test payment, and we're done. To see how that affected the inventory, we'll go and view products, then we'll go down to our Hand cream.
As we look down, we see the Stock has been diminished to 4, which is exactly what you would expect. Now let's go back and order 4 of those hand creams, and see what happens. Add it to the cart. Let's try to buy 5, in fact. Update the cart. It's telling me that I can only purchase 4, and if I do go 4, and update the cart, and check out, if I were to go through the whole process, and complete it again, the next time that I went to that front page, it would tell me that it's sold out of that item, and the button wouldn't be available. So let's go through that.
Flat Rate; enter all my information. Now when we go back to our front page, scroll down; out of stock, and we can't order it. We can still read about it, however. And here's an interesting thing: if you wanted to make your store really proactive, you might be able to do a little bit of Drupal magic, and put a link here saying, request this item. That way people could continue telling you that they want that thing. It's a good way to have a pull marketing, instead of a push marketing. If you want to go even further with Commerce Stock, take a look at this video by Randy Fay, who's one of Commerce Stock's main developers. His video is at commerceguys.com/resources/articles/216.
He shows how to set up rules to send an e-mail when the stock gets below a certain level, so you always know how much to add to the warehouse. But be forewarned, it's kind of complicated. That is the nature of rules, which is almost like a programming language in itself, and to tell you the truth, the details of that are beyond the scope of this course, but even without writing your own rules for controlling inventory, the Commerce Stock module gives you what you need to keep track of what you have on hand, and will help you avoid overselling.
Find answers to the most frequently asked questions about Create Your First Online Store with Drupal Commerce .
Here are the FAQs that matched your search "" :
Sorry, there are no matches for your search "" —to search again, type in another word or phrase and click search.
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.