I remembered why I started writing this blog about Drupal for ecommrece a few years ago, thinking it would be a temporary set of notes kept for a month until I could get a better veggie shoe shop site online - hence the blog name "buildlog". I remembered that Drupal plugins are rather exciting in inviting you to a techie world rather like the script installer on your web host. Drupal has a pre-arranged "distribution" for daily deals and another for a hotel selling bookings. It's easy to hope that there will be some module soon for whatever trade you are in, or maybe a developer could write something for you that would be much harder to write for standard shopping cart software, like a link to your accounts program or something more exciting perhaps. There is a chance to collabrate, which is more interesting than just competing. I remembered that you can install Drupal from there, then go to its admin page to install more modules. You can see the "Modules" link near the top right of the picture. Click on it and this is what you get:
You can find modules and themes on drupal.org. The following file extensions are supported: zip tar tgz gz bz2.
For example: http://ftp.drupal.org/files/projects/name.tar.gz
If you can find the right module from the modules link, right-click to "copy link location", then go back to paste it into the "Install from a URL" box. Press "enter". If all goes well you get a barbour's-shop bar accross the screen for a while, then some message that includes a linke to "install new modules", which takes you back to the modules section of your admin screen.
Names of required but now missing modules are in red that you now have to track-down and install from the same site (it's not automatic). Then you can tick the box next to Drupal Commerce, press enter, and automatically the thing installs all the relevant modules with a the odd hickup where you have to press control+backarrow and try again. Finally you have a new admin column called "store" and an option to "add product".
It's not a lot of good is it? A bit liked a stipped-down racing car or a quadbike for someone who really wants a delivery van or a market stall or some other wheeled retail thing as a metaphor. In the USA where they watch films of cowboys and covered wagons or carts, they call the things shopping carts. The term is well-know in the internet retail trade. It is not what you write from the screen shown shown above.
There's no help about related issues like the categories of the catalogue and how they are laid-out, nor attributes, nor any warning on the page about this instruction:
I tried a google search by date in case there's anything recent to say "this new module irons-out the techie awkwardness of doing the most basic things on this software", but not much came-up. Only one thing came-up in the last 12 months from 2015.06 .26 backwards.
No results. Except something 10-months old about writing your own php code, which very few shopkeepers are likely to want to do, unless they are sick of being shopkeepers and want to build a new career in php code-writing. Not many people would want to do both at once for long.
I tried searching modules on Drupal.org but find the search system hard to use. The Drupal Commerce site itself has a list of modules so I tried reading the title of every single one, loosing track a little.
DrupalCommerce.org still set themselves a dual role in bidding for big-budget work while promoting Drupal Commerce for the cheap or DIY work of which they have no direct experience to keep them up-to-date. If they could somehow find enthusiasts from among developers who do this kind of work to keep that part of the site up to date, that would be great.
They have a "distribution" category. They don't mention whether you can use a script installer on your web server and then press a button to upgrade Drupal to the full distribution; I don't know.
they don't mention a new one - Drupalife Store mainly in Russian.
I doubt these are a first choice for a shopkeeper looking for a cheap e-commerce system because of the fiddleyness of installing Drupal without being able to use a script installer, but they may be good for shopkeepers who want a bit of this and that and some integration.
Drupal Commerce themselves have a "utilities" category. These can be installed onto a Drupal installation that comes from a script installer on a host site. Drupal Commerce mention a module as well as providing a screencast of how to use it, but it remains in Alpha release with no further development planned:
If the module is perfect, there's still the problem of the people who write Drupal-based shopping cart software, usually for a living as part of some company and think it OK to promote software to small business which is no good for small business; it is a kit for web developers. I don't know if it's chance that Wordpress shopping carts have problems fitting-in to their market too. I haven't tried Joomla-based shopping carts but maybe they don't know what their prospects want either. A bit like most of us in other parts of life but I shall stick to technical discussion of shopping cart software.
In the 8th drupal video tutorial of this series, we continue developing our Ubercart site by uninstalling the catalog module and overriding our taxonomy terms with the view provided by the Views module.
[0'00"]
Hullo and welcome to the 8th of this 10-part video tutorial series on using Drupal & Ubercart.
I am Pete Yaworski the Toronto web developer specialising in using Drupal, and, like all the video tutorials in this series, this is brought to you by myself as well as by the Ubercart.org team, who thought it would be a good idea to help those who are new users to Drupal and Ubercart, and get this [series of videos] out-there to help everybody out.
Transcribed to this web site by someone else who only places one small advert on the whole page
last video and introduction
So, that said, we are ready to continue-on, right out of [after] Video Tutorial Number 7, and if you have not watched that already, I suggest you go and do that.
What we did there was we created our taxononomy - or rather our catalogue based on taxonomies. We saw that there was a bit of a hiccup between taxonomy terms for path urls, and taxonmoy terms for the catalogue terms itself. There was a bit of duplication there. So I said that I would show you how to create a customised view, that I like to do, that gives you a little bit more control over creating catalogues. So we are going to dive-right-in to that and get started.
The first thing that we are going to do is that we are going to go-over and I am going to [actually]
disable the catalogue module.
> modules>list | update | uninstall> catalog
catalog [un-ticked to disable, then press Enter or the
One thing that I want to do - that I just want to flag before I [actually] do this - is - (I'm sorry. You will have to wait for me while I find this). When we do this we are going to remove all the terms from our products, so if you go-ahead, and if you have set-up dozens of products or hundreds of products or what-not... When you remove them all, it will create a little bit of a hiccup for you. It is possible to go-in programatically, and add all-new terms to them, maybe using Drush or something, but that is going to be beyond the scope of this video tutorial. So: if you have already done that, it might be best just to stick with the catalogue module. But, if you are working with this video tutorial series, all-along, it might be better just to get rid of the [default] catalogue module, and we are going to make our own [catalogue] which gives you a little bit more control and is a bit more versatile. [1' 48"]
(I should mention that this video tutorial might be a little bit longer than the others because: I really don't have a plan on showing this, but as we (kind of) got into the video tutorial series we thought that [this technique] would be a good thing to have. It is something that I usually use, and we thought it would be beneficial to others.) So:
I have gone-ahead and (actually) disabled the catalogue module, but when you do that, Drupal keeps all the data for the modules that were installed. (So) Once you change it, you change your database, and that data is not removed. The reason why Drupal does that is so that if you uninstall something and you still need that data, and you want to reinstall the module, you can bring that data back in; you won't have lost any data. [02'27"] [?] We actually have to go-in and we have to un-install the catalogue.
When we do that, it will remove all the data from the database that is associated with it.
> modules>list | update | uninstall> catalog
catalog [ticked and pressed return or the red uninstall button]
Now that that [module] has gone, if we go to our taxonomy terms
> structure > taxonomy > add vocabulary
you will see that it does not wipe out the catalogue that's there because it was created by the taxonomy module. We will go ahead and we will delete that. Now, when we do that, if we check under products, we don't or we should not have this catalogue field. I think that if we go and look, it will not be there. If you look at all those fields, none of them refers to the actual catalogue. So if we flushed our cache we would not see that there.
So that is the first step.
We now want to make sure that the content that we have is .... oh I had better delete that ...
We want to make sure that the content we have that we have previously associated with those taxonomy terms is now no longer there: if we go to "site membership" we should see that there is no actual taxonomy term here. Right. Remember that we had added it for a catalogue. It is now gone. [3'45"] What we want to do then, is we want to create a [taxonomy] vocabulary for ourselves.
(By the way, if we go to Taxonomy here we will see that taxonomy is gone, but there are still [taxonomy] terms in the menu. The reason is that the menu is actually cached in Drupal, so if we flushed the cache it would go away; this is a cached version of whatever the menu is.)
> structure > taxonomy >
So if we go to
Now we've done that let's go ahead and add some terms. So. Name: "T shirt". We could add some meta-tags and relations [?} if we want to , but we don't really need to do that [at this stage]. We have added T-shirts. [Name] "CDs". [save]. I guess people don't really want to sell CDs any more but we are going to go historic here. And now, I guess, books. People still sell books. And three should be enough, so that's fine. [4'48"]
Now we have taxonomy terms but we don't have them associated with our content . So if we went to...
...you'll see that we don't have any fields, so we will have to add that [association]. We are going to add a new field here.
> structure > content types > Product > Edit | Manage fields tab | Manage display | Comment fields | Comment Display
We are going to call this "Product Type". And [5'11"] you actually can't see what I'm doing here. But I am going to make this a term reference - that should be on your [drop down menu] list.
And let me make this a select list because I only want to be able to choose one. [5'20"]
(If you want to make this a free tagging [site], where, you know, you have thousands of different tags; you never know what you are going to have, you can make this
So it is actually going to use a product type vocabulary . [scrolling down the page looking at options]
It's going to be a required field.
It's not going to have any default [value]. We are only going to allow one value. And it [the value] is going to be out of the product types. So I am going to go ahead and save that. Obviously you could change that if you wanted. And I'll leave that. That's fine. [05'58"]
Now we have our actual contents. [from the admin>content menu]. When we go over to add a product ( we are going to do this afterwoulds, actually, but I just want to show you) .
?missed a bit? Now: if we go over to Views, the Views module comes with a taxonomy over-ride.
What this will do is: -
The system actually has urls for taxonomies.
They are always: taxonomy / term / termID
So when we create these taxonomy terms using the url pathauto module... If you remember we set-up the data:
we had url aliases and patterns set-up for taxonomy terms. >configuration > search and metadata > url aliases > patterns
So it will be the taxonomy vocabulary plus the term [that is] what we will see [in the url]. [6'40"]
What will happen here >structure>views>taxonomy term>path ...is
Views [module] will over-ride [urls set-up as above] using .../taxonomy term /....
and then it will take an argument [technical term from maths?], and that will be based on the default menu , so we can over-ride what our actual View will be or what our page will look like for the specific taxonomy term .
(I know that this is probably going over way your head [and I have just enabled the redirect module? Yes? No?] I know that his is probably going way over your head and it is way beyond what this module originally envisaged, but I just want to do this because it is a great way to customize what you are doing, so: just trust me and bear with me!)
So now we have a taxonomy term over-ride. [7'16"] Let's go ahead and we will edit this.
>structure>views>view>taxonomy term>edit [on a drop-down menu at the end of a line]
We are going to take a quick look into Views. What Views actually is, as I think I mentioned before in another video tutorial; Views is a graphic interface for creating database queries. Rather than write your constant query - like "select from where", you can do it all through Views [module] and it will actually develop a query for you, run it, and you can create pagers [third line from the bottom] out of that.
The default taxonomy over-ride, when you launch [a site] is an unformatted list of teasers. [short first parts of paragraphs encouraging a click to further reading of blog posts]. [7'42"]
Fields: The selected style or row format does not utilize fields.
I don't want to do that; I am going to change that. So the taxonomy over-ride will use...
[clicks on Show: Content to get some options on a pop-up menu][7'46"]I want fields.
And now I am using Fields [there is an Add link next to Fields: , which leads to a pop-up menu of about 20 names of fields next to tick boxes = check boxes]
Format: Unformatted list | Settings
Show: Fields | Teaser Fields: AddThe selected style or row format does not utilize fields
So I am going to go ahead and I am going to add two fields. [a drop-down Filter finds them on a long list]
This is just quickly [choosing options out of about 20] - obviously you can change it a little bit yourself.
First I want my Content: Title - the content title
Then I want my Product: List Price
And the Product: SKU- so I lied: I am going to add three fields.[8'19"]
[another menu pops-up automatically labelled Configure field: Content: Title]
Right: So we will keep the title..
And I am actually going to make this a table, so we will keep all these labels that we have. [on a follow-up screen] So that actually makes sense for someone who is going to read the page. Instead of making this an unordered list we are going to make it a table. [clicks on Format: Unformatted list |. A menu pops-up]
You have some other options here [on the "Page: how should this view be styled" pop-up box] if you want to chase those up [experiment]. So that is my View.
One thing I am going to do is that I am going to make sure that it's only products that are going to be shown on this. This is a bit of a caveat. Bear with me for one second here, and I am going to explain this to you.
>structure >views >view >filter criteria >add [on a drop-down menu at the end of a line]
Content: Type - the content type (for example a "blog entry", "forum post", "story", etc)
[after pressing the "apply" button, a second menu pops- up][8'58"]
I am going to add content type. OperatorIs one of
I am going to make sure that this is an acutal product. Content types
Select AllArticleBasic PageProduct
I go-ahead and hit "display".
If you are only using one taxonomy on your site, so you are only using products and you are only using taxonomy terms related to those products, this solution is fine. [9'39"]
you are using blog posts, and
you are using taxonomy terms to categorise the blog posts, and
you are using articles and
you are using taxonomy terms to categorise your articles,
you are going to run into a problem here. Because
this overrides all taxonomy term views, and so all the different vocabularies and terms;
your other content is not necessarilly going to have these prices and SKUs, and
you might want to have a teaser for that specific article or blog post.
If that is the case, then you are going to have to look-into another module called the View Field Module. What that will actually allow you to do is create
different taxonomy overrides for different vocabularies. I actually haven't used it, so I am sorry: I cannot go into the details about it. But there is a great post here ... that details what you have to do in order to override this [thing]https://drupal.org/node/424168#comment-5082962 [...]This will tell you how to go ahead and do that [other thing] . The project itself is available at https://drupal.org/project/viewfield
So this is the module. I'd advise you to go ahead and get the Drupal 7 version, so you can test that out. So that is a brief side-note. For the sake of this video tutorial that [problem and solution] is not going to be an issue because we are only going creating products on our site.[10'47"], so we can override all taxonomy term fields.
That's why we had a content type filter there.
Let me go-ahead and I am going to save this [screen of settings using a save button top right]. [10.58"] Attributes
>store >product >attributes [11'10"]
Before we actually go ahead and create some products with tags, to look at this different view, I am going to go-on to the next part of this video tutorial and we are going to go about configuring attributes.
So to do that we are going to go to >store >product >attributes
In the previous video tutorials in this series, we went-ahead and we created [the attribute] color. You will see that we have got grey, black, and red. And so, for the sake of users who, maybe, missed that video tutorial, I am going to create a new one. I am going to call this a "yellow" colour here. And you will see here that the default list position. This will come-up when we add our products. Don't worry about that. You can change it if you want to. [11.46"]
Default Adjustments:
This is an interesting and helpful field. What it allows us to do is: you'll see that if you do sizing, you may want to have a
default cost, and you sell an XXL, there is more material so it can then charge an extra $2 for a XXL shirt. So it will add $2 to this; every time you have a product that has an attribute of XXL, it will add $2 automatically on to that cost. And you can associate the same thing with the
sale price, so that it adds $2 on. Alternatively, if you are doing something associated with a specific
weight: if there is a specific weight for this attribute, you can go ahead and add that in here. These are all defaults.You can also do this [adjustment] individually on
specific product; you can do that as well. So that is a great thing about attributes here.
So we will go ahead an we will submit this. That makes four attributes for our products. Now let's go ahead and add some new content.[12'31"] >content >add content >product
Just as a reminder: if you already have content then you will now be going back to it, as new taxonomy terms that we create for our product [??].
>content >add content >product So: creating a new product. Back here. So we are going to call this - I dunno
[13'00"]
It's something on a CD, Right?
So now what are we going to do now? I guess we are not going to need an image, but we will add an image anyway. We don't have an image, so as always in this video tutorial I am going to upload one of our dog Baily.
Now, I am going to say [in the Product Type box with drop-down options: select option, books, CDs or T shirts] this is a CD.
So the SKU [in the SKU box] is going to be "pete's CD", right?
SKU*
The sell price is a whapping...
...because everyone wants to hear me sing. And the maximum package quantity
Default setting. So we are going to leave everything as default , because we are just doing this to take a look at Views[module]. We are just waiting to for the image to upload: it's almost done.
There. Now, with the magic of editing, that took no time, so we are just going to [press] save and Continue.
[13'43"]
Where do we go? [to the shippable box] This is a shippable product. [clicks] It is not shippable product any more [lie], so we press save and continue. adding an existing attribute to an existing product >content >add content >product (using attributes configured on >store >product >attributes)
Now: the reason why we went-ahead and pressed save and continue is because I want to remain on the products page so we can go to our attributes. So: we have to add an attribute to this product. We are going to add our colour attribute. Now, once we do that...
We can go to our options, and you will see here that we can choose the options which are associated with this particular product. So every colour is going to be available for the cover of my CD, except for red. Now...
We are going to go ahead and save that.
If I wanted to adjust my cost for my price and my weight, for this specific product, rather than using a default, [in the cost boxes next to each option] I can go-ahead and do that. The default [radio button] will select which option will be selected by default when a user selects this [CD] item. It will be defaulted to black. So I will go-ahead and I will submit that. And I will save that.
If we go and look at [the] adjustments [page], we can see here that we can use alternateive SKUs. [by filling-in the boxes]: Pete's CD black; Pete's CD grey, and Pete's CD yellow. Again we are going to go-ahead and submit. [15'07"]. And then if we go back to the product [page], we are still good: we have our product CD, we have our regular default SKU, we have our sale price. So we will go-ahead and we will save that.[15'17"]
Right. There's our list of products. So if we click on "CDs", here, it is going to show us all our product types... here is our actual View. We see title, we see list price, we see SKU. So that is defaulted, rather than the catalogue [default setting] that we had before. You will see that we have a product type of CDs.
If we go to >configuration >search and metadata>url aliases>
you will see that we have one [url alias] for each. Taxonomy terms 7, 6, and 5: these are the taxonomy terms that we created. Bulk CDs and T shirts. And we are good to go. [15'55"]
Screen revolves.[16'02"] replacing the catalog
OK. So now we are actually set-up I am going to go ahead and show you how to replace the catalogue.
You will notice that we are on a different screen, because I actually screwed-up the video tutorial, so I paused it, and I am going to show you what I am doing. I have erased that part of the video tutorial, so we are starting here.
Right now what we have done is that we have over-ridden the taxonomy term pages so that we have a specific look for our product types and a we have gone and done that with attributes. What we don't have is a list of all the different product types , that we can go into, kind-of like a kind of product catalogue , and then go-down by specific fields. And so we are going to do that. [16'31"]
Let's go-ahead. We'll go to [admin>structure.] Views. And we have to add a new View. [View Name box] "ubercart product". It's going to be actual Content [in the show box]; it is going to be of type product [in the type box], [in the sorted by box] newest first. In the Page title box: catalogue. This is going to be at [in the path box] "product type".
Let's just confirm this. [on admin>configuration>search and metadata>search settings>] because what we want this to be is the beginning of our actual [alias: product-type:books].... yup!
So what we actually did was [to make sure that] if we went to [path] product types, it would work as a url, and if we went to [path] /books, it would also work as a url. That's just good development practice.
We are going to create this as a table. With fields [these are the default settings] times-ed by ten. We are going to use a pager. [there is a ticked box called "use a pager" - maybe for page breaks?] And we are going to go ahead and edit it. So, now, what we want this to do is kind of create all of our products on the page, and allow users to filter them. [17'41]
So, what we are going to do is to create a similar View to what we did on the other View.
Then when we go-over to get that View you will notice that I have changed a few things, but nothing overly crazy. [using an Add fields pop-up, working down the options]
We are going to add the add to cart form - so I can show you what that looks like.
We are going to add the display price.
We are going to add the image [ticking a box marked Content image (uc_product_image: delta) Delta: appears in - node product, node product_kit ]
I think that's it. Obviously you would want your two Views to match-up, so it look consistent between the two. It's not a huge concern, but it's just a good way of doing this.
[create a label box is ticked, followed by a "label" box]
We are going to call this [label] "image" [filling-in the box][18'32]
Ah. The Delta. We are not going to use this.
So we will use the add to cart. Wait for that to display.
Price: we will go-ahead and edit that.
Then we'll go back to add that image. Hold that window. [18'52"] [ticks a box]
We want this image. Not the Delta one. We chose the Delta before. We want the Content Image.
So it is image, then we are going to select thumbnail; link this image to content [from a dropdown box labelled "link this image to" with content as an option]
We'll add to display [clicks an accept button at the bottom of the page]
Now the cool thing about this; the thing that gives it a twist, is that, right now, this will show all of our products. So if we went-over to this, let's save it [presses a save button] and go and take a look at it. [The screen reverts to a browser default page until the path the the site is re-typed] [19'26"]
Right: here are all of our products; we can add all of them to the cart.
But if you have, let's say, a thousand different products displayed in a haphazard way. So, what we can actually do, is a pretty cool thing with Views, is to add an exposed filter for users to specifically choose: if they only want to see your T shirts, only show them your T shirts. [19'53"]
We are going to go-ahead and go-into content, [on the "add filter criteria" pop-up menu] and we are going to choose taxonomy terms. We are going to apply that. And now: it is going to be[from vocabulary options of "product type" or "tags"] a product type, and it is going to be a [selection type either dropdown or autocomplete] dropdown. So [press button] apply and continue. [20'04"]
[next screen is called "configure filter criterion. Content: has taxonomy term]
You are going to expose this to the users. So now they have control of this.[20'07"]
[in the "label" box types] "only show the following products" [20'13"]
[looking at an "operator" selection - "is one of", "is all of", "is none of".... ] "is one of" [20'16"]
[looking at a "select terms from the vocabulary Product Type" form including "allow multiple selections"] We are going to allow multiple. [20'16"]
["remember last selection" is a tick box] You can remember the last selection, so you show them T shirts if they have always had T shirts before. It is entirely up to you.
[presses "apply" button] press apply and it is all displayed.[20'26"]
[presses "save" button top right] Now we are going to go ahead and save this. [20'31]
[presses F5 in windows] We are going to go-ahead and re-load this page. [20'33"]
Now they can go ahead and say "I only want to see CDs"
[selects "CDs" from the new drop-down menu and presses an "apply" button.] And there you go. We only have one CD. [20'39"]
And go-in to this, [shows picture of dog Bailey],
And they want to see the other CDs.[shows summery of CD as for a list]
And you will see now [in the path] that we have "product/CDs"[20'46"]
So this is our other View that we created. And from this they can use the add to cart form, right-away, and if they decided that they wanted to see all your product types, if they removed "CDs", and then they are back to all of your products. This is why I like using Views and doing it [the catalogue] myself: just because you have complete control over this. [21'02"]
One thing I should mention again, is that if you are using multiple taxonomy terms for products , you are going to have two different exposed filters here, and you want to create another View for, you know, product types, or lets say just the licences. So: just the licences. And then you would want to remove your and you kind of get into trying a template for that in PHP. That is a little bit beyond the scope of this video, but you can actually choose which exposed filter is shown. You know, if you are interested in that, I'm happy to do a tutorial on it, supplimentary to this video tutorial series: I just need to know that you are interested in it.[21'32"]
That's pretty-much it! [21'33"] Just to re-cap on what we did in this video tutorial, we just went-ahead and -unistalled the catalogue module. When we did that we -removed the taxonomy terms for those associated products
so if you had gone ahead and created a bunch of different products and taxonomy terms associated with the catalogue, you would have run into an issue, but, that said, we unsinstalled the module , removed all the data, went ahead and -created a new taxonomy.
Specifically: we created the product type vocabulary.
We added some new terms to that. -Then we created the taxonomy over-ride view.
So what this did is that it gave is something like "CDs" - right? Where we actually had control over how it was shown to users. We then -added some attributes to different products, in a sidebar to the actual views, which enabled us to select grey, black, or yellow. You will see how these appear here when you are listing them. Then what we did was [that] we over-rode we created a new view to replace our old catalogue, which showed all of our product types, and we -added an exposed filter so that users have complete control over that [view]. They see what they want. If they want to see books, they can see books; if they want to see T shirts, they can see T shirts.
That's the end of this video tutorial. I hope it helped-out. We are nearing the end [of the series]. I think that in Video Tutorial 9, what we are going to cover is product kits and stock, and then I think we are pretty-much good to go. The last video [number 10] will just be about testing: making sure that your site works properly. What you need to check; what you need to know. And then your site is ready to launch. So we are all but there. If you don't want to know about stock or product kits, you can go ahead and launch your site now, and you have pretty much got all out of this video tutorial series that you need to know.
I hope this has helped you. I am getting some great comments. I apologize that the video tutorials in this series aren't coming faster, but it's time-consuming. So, leave a message [on you-tube]; let me know if this has helped-out.
https://vimeo.com/40933753 - I hope this transcript is copied and improved by others. http://lbt.me/Wyw is another page on the same subject, mentioned on the module download page.
Hi!. I'm Bojan and I work for Commerce Guys. This is Commerce Module Tuesday. Today I will show you the Inline Entity Form Module.[included in some commerce kickstart installations]
It provides a complex widget for reference fields that allows to modify and delete reference entities inline, as well as at
For Drupal Commerce, this means that it solves two important use-cases.
First of all it unifies the management of product-displays and products, allowing you to handle both, from the product display, and edit pages.
Secondly, it also provides more flexible line-item functionality, giving you the ability to modify custom fields that you attach to the line items.
The management of Product Displays and Products
[there is a comment below which might make sense of this]
Let me show you what I mean. I have here a Commerce Kickstart 1 installation [the one with Product One, Product Two, Product Three on the front and a standard Drupal admin menu] , and I have already downloaded and enabled the Inline Entity Form module - the Beta 1 version. [which is included in Commerce Kickstart 2 by default].
Lets imagine for a moment that we are building a website for a company that sells T shirts.
I already went-ahead and created a new Store > Products + Add product type
product type called T shirt. Aside from the usual fields like Image and Price, it also has the Color and Size fields, which point to the vocabularies which hold the allowed colours and sizes for a T shirt.
In e-commerce language, a product can have several variations. So a sample T shirt can have a new variation for each of the combinations of Color and Size, and each of those variations has a different SKU [part number]. So in Drupal Commerce this means that for each variation, you create a new Product, and then you create a new Product Display that references all those variations, and allows the user to select the correct one. So I have four sizes and four colours. I need to go to the add product page [clicks "create T shirt"] Store > Products Create Product a basic product type. Create T shirt
...and create sixteen different products. Then I would need to go to the... Products > Actions > Add a product Add Product Display
...page, and reference the sixteen products that I have created.
The product display field looks like this, at the bottom of the product page. I can't find it on the page though. This is where, for me, the video is ambiguous and I do not know how to follow it in order to set-up shop, even after transcribing it carefully. It is better than average among the videos transcribed here, but I guess that the people making the videos do not know where they make sense or don't make sense, and that's why there is often a bit that's impossible to follow for some people watching.
Product Choose the product(s) to display for sale on this node by SKY. Enter multiple SKUs using a comma separated list.
I'm going to go to Structure > Content Types > Product Display > Manage Fields (which is 2nd tab) &
you will see here (4th line) that we have a Product Reference Field. I am going to edit it.
The first thing is that I am going to change the label to Product Variations because it is slightly more user-friendly in my opinion. We are going to delete the help text because it is not going to be shown anyway.
And I am going to limit the product types that can be referenced to T Shirts alone,
Product types that can be referenced
Widget type
Done.
So:
36'36" Let's go ahead and add a new product display now. [does so on screen]
You will see when you scroll-down that, instead of having a simple product reference field, I now have the complex vision that is provided by the inline product entity form. I have a product-variation inline-form opened by default. And that form contains three groups for all the product information. So,
in the first group, I have product atributes,
in the second group I have the SKU, [types on in] the price, and then any other custom fields that might be added under 'attributes', and
in the third group I have variation image. [uploads image]
So I click
...and the first variation is there.
Let me go-ahead and add a few more.
[does so]
So: all of my variations are now here.
I have added all of them from the same screen: not leaving the product display add-product page, and not needing to know anything about Drupal Commerce architecture underneath.
If I need to, of course, I can delete a specific variation. For example this one
And of course I can edit the ones that I have already added
Clicking the edit button opens a form right below the row being edited, and allows me to change the inforation that I want to change. [changes a price on screen as an example].
So, I go ahead and save that [using a button at the bottom of the screen]
5'32" And you will see that it now works!
And I also want to make it possible for the user to reference multiple product types. In which case they can go back and enable the...
Product types that can be referenced Product
...product as well. And now when I go back, [clicking to another browser tab] you will see that the widget has changed.
Instead of just having an "add variation" button, I also have a drop-down option to select the appropriate product type. If I click "select product" and click "add", I will get an add form for this product type. Which for example does not have any attribute fields. Different product types have different attributes, which are not shown in the table itself. Instead I have the variation title. And this one is automatically generated by the ???? form, by taking the node title and appending any attributes, if they exist.
6'30"
Of course, you can turn this functionality off if you want to. So...
I can, once again, go to the INLINE ENTITY FORM field set, and disable auto-generating of the product title.
INLINE ENTITY FORM: COMMERCE PRODUCT Auto generate the product title
And now when I go back to the same Store > Orders
page, you will see that the widget has changed it. [the culumns for each line shown under the EDIT tab are
LABEL, UNIT PRICE, QUANTITY, TOTAL OPERATIONS, with
showing in the last column. I now have a proper edit button allowing me to change all the information on this line item, including the print name field. I can also add new items, and fill-in all the relevant information.