Tuesday 31 January 2012

Installation: possible?


Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 85 bytes) in /home/veganlin/public_html/X/includes/menu.inc on line 3669

This is what happens if I install Drupal 7 from my web host's installation aid, something like Fantastico or Scriptulicious, and then install each of the modules required for Drupal Commerce. I pick one that has little else depending on it - I think it was advanced help - and I get a Fatal error. From experience, I think it's possible to use control+backarrow and have another go. Sometimes the thing installs second or third time. But this is not going to be a reliable site.

The other way of installing Commerce is what the 25 minutes lecture below suggests. I tried importing the database this morning and got an error message, which is odd because I think it has worked before:
https://veg-buildlog.blogspot.com/2011/12/uploaded-database-i-used-import-from.html

It looks as though the hardest problem with Drupal 7 is going to be squeezing it onto cheap server space and finding ways to install without overloading the memory. There is some other system I've read about but know nothing about - I don't quite remember even what it's called - is it Drush and is that the answer?

Sunday 22 January 2012

Building an awesome e-commerce site in 25 minutes (without losing your soul)

http://www.youtube.com/watch?v=ViS2xFvnZwc&feature=BFa&list=PLCDB80A0209EC71E1&lf=plpp_video


Hullo. My name is Andrew. I work for a company called Real World Technology. We do a range of different things, but I am here to talk about a wonderful thing in the Drupal ecosystem in my opinion, and that's called Drupal Commerce. So you're probably, or you might have heard other people speaking about it a little bit this weekend. It's come-up. It's been cursed in some talks; it's been praised in some talks. I think it's one of the best things that's come to the e-commerce community as part of Drupal.

We're going to have a chat a little bit about that, and we're going to have a go at making a working, ready, production, e-commerce website, in - pretty much on 25 minutes. So all being well; no computer and technical glitches, that should be all good.

What is Drupal Commerce? [screen]
  • A modular eCommerce framework
  • Designed to let you "build" new stuff
  • It's really cool

So before we actually get-in-to Drupal Commerce, I just want to do a quick show of hands:
how many of you have built an ecommerce site before? OK.
How many of you have enjoyed the experience? I've got two hands! And a half!
Who has used Drupal Commerce before now? OK: we've got a few people around.
How many people have used Ubercart? OK: a few more of you.
Magento? Yes.
OSCommerce? [two or three]
Who has written their own [holds-up his own hand]
Things not written in Drupal that do e-commerce?
Anyone used Shopify or any of those sorts of things? No: OK. One. That's good. OK.

Well,
Drupal Commerce is a little bit different to most other ecommerce distributions that are available on the market. Drupal Commerce is really a framework to allow you to build ecommerce stores and ecommerce platforms. Drupal Commerce in and of itself is a bunch of really really small modules that do a set of small, defined, contained things. And, out of the box if you just go to Drupal.org and grab the Commerce project and install it on your site, you're probably going to be finding that what you've got is something that
  • doesn't do a lot, is
  • pretty confusing, and a
  • little bit hard to get started with.
So,
We're going to talk a little bit about that today, but the thing about Drupal Commerce, that sets it apart from everything else, is that it is a set of components that allows you to build something big. And build something better. My background: I build e-commerce sites. I've been building them since I was about 15.  The first e-commerce site I built was a custom-built site. It lived in asp.net. Or I should say "asp": this was before .net even existed. It sold products for a store. I can't even remember what it did. It had a Microsoft Access database back-end because - you know - when you're 15, Access is cool. Then you grow-up and realise that it really wasn't, but that's OK! That was the first site that I built. Since then I've built sites on Magento; things built on Zend framework, some stuff built on Syphony, ran a very large website built in OSCommerce for around five years. So I've had a bit of an exposure to what's available in ecommerce platforms, and building different things. And together with my company we've built web sites for some very very small people, through to some very very large NGOs and other organisations that wanted to extend their business onto the internet.

The thing that I found, time and time again, is that when I go and I download something like Magento, or I go and I download something like Ubercart,  I discover that, provided that what I want to do works straight out of the box, the solution is absolutely perfect. But the moment that my customer comes to me and says "what I want is X and Y and Z", and I can't quite do it; the modules don't quite get there or I can't change what I want easily.... I end-up hacking something together and making changes and doing things that break my upgrade path. That in the end means that the customer gets a solution that they're not really happy with. It just becomes a bit of a mess.

Now,
I see that Drupal Commerce addresses a number of these issues, by - instead of trying to be something that is all things to all people out of the box - it tries to be building-blocks that give you pieces of the bigger puzzle. So: it's really cool like that.

So,
What does Drupal do? It does most of the things that you'd expect an ecommerce platform to do.

What can it do?
  • Manage products and display them
  • Manage orders
  • Take payments
  • Calculate tax
  • Give discounts
That's what it will do pretty much out of the box.  We can also handle shipping; we can do stock, we can do coupons and vouchers. Some of those things might not sound like very big business goals. But I started using Magento when it was a 0.9 release. It was the coolest php-based shopping cart system available on the market and probably one of the best that was available at the time. It had a nice UI (user interface); a nice customer experience that was only rivalled by some of the really really big ecommerce stores. But then we wanted to give coupons to our customers to allow them to buy on it. They only realeased that module into the community about 12 months ago. That's like three years after the product was there. But Drupal Commerce has it today there right now. So they are really quite good.

What are people using Drupal Commerce for?
  • Everyday online stores (eg ozonekites.com.eu)Today if you are online you can go and jump on there now. It's an Australian-based store. They sell kites. It's pretty cool.
  • Membership websites (eg subhub.com)Dries mentioned in his keyonote [speech] this morning Subhub.com. Subhub is an example which I've come accross which is really unique. They have a Drupal-based-web-site that sells Drupal-based-web-sites to sell stuff! Which is, kind of, a bit of inception, but it's pretty good! So you can go and you can buy a website from Subhub to sell subscriptions to your magazine. Or to allow you to download music from your music-band-thing that you play in or record for or something like that. It's pretty cool.
  • Discount style websites... is another unique thing. Someone has gone and built an entire clone of the Groupon website, in Drupal Commerce, packaged it up as a Drupal Distribution, and you can go, download that, install that on your web server, add a bit of theming and bits and pieces: and you've got your own Groupon site. And you can give your friends and family discounts to - I don't know: whatever it you want to give them discounts to. Or however that wants to work. But it's there. It works today right out of the box.
  • Donations (eg ioby.org)... and there's
  • Many more (see drupalcommerce.org/showcase) There's a long list there. That's only half of what Drupal Commerce is doing out-there in the wild today.
One of the things that I promised was that we were going to build and awesome Drupal Commerce website from scratch in only 25 minutes. So let's get-in and do that. We've only got 13 or 14 minutes left in this session!

Installing Commerce
  • So, we're going to Start with something called the Commerce_Kickstart install profile
    Commerce Kickstart is basically a full Drupal 7.10 (at the moment) distribution, with all of the Commerce bits and pieces ready to go, which you can download. Install on your web server [if it has the capacity which cheap ones don't: you have to install from a database]. Follow the install script. And have a functional working Drupal Commerce website.
  • But it's really designed for being used in the US. So what we're going to do, then, is: we're going to grab the Commerce_Australia module for some country specific configuration - which has some configuration for currency display and GST Time, and it just makes it easy to get them up and running, and install that, and taht's what we're going to do to start with.
  • Let the fun begin
[...] [8' 20 seconds]
I've pre - downloaded an installer module onto my machine, set-up a web host: all of those sort sof things

OK, it's going to run away and it's going to install all the modules. It's going to configure everything as a kind of a base starting point and get us ready to go, and when this is finished in just a few seconds we'll get to the configure site . I'll set some settings like you would if you were normally installing Drupal. And then we install some example stuff. And we wait. This is probably the most boring bit. If anyone feels like donating me a faster macbook pro I'll gladly accept.

The advantage that the Commerce Kickstart module has over downloading Drupal and adding the Commerce module is that there is a bunch of things that you need to get Commerce working. We'll talk a little bit more about some of those things in a minute but there's a lot of dependencies, which are normal things that you'd probably run on your Drupal website, but the Commerce Kickstart distribution has those things in it from day onee. So you don't need to worry about those sorts of things. You can install it in a Drupal site if you've got it up and running and add bits and pieces. We're just doing it this way because we have limited time, because I set  a rediculous time limit!

We're going to call the site... I think we're going to sell some Ferraris. [see screen] Save and continue.
We're going to put some example content in because it makes our life easier. In case you were wondering, we have now been running for three minutes out of our 25 minutes, and we now have installed Drupal Commerce, and we have a working functioning ecommerce store.

So
  • I can add products to my cart
  • I can view my cart
  • I can make the quantity five
  • I can update my cart
  • I can checkout
  • I can fill-in some details and go right through and it will work. We'll look at that a little bit more later.

But
What we're going to do is we're going to do a little bit more than that; there is a little bit more to be done.
So
This is what we're actually going to build. We are going to build the Drupal Downunder 2012 Farrari Store. We are going to sell Micky Mouse cars; we are going to sell Honda Civics and Farraris - maybe. We'll definately sell Farraris: I'm not so sure about the rest of them.
So
A couple of things that Commerce can do. One of the nice things is that it groups products together like this [attributes] so that we can have a yellow Farrari featuring red starbursts; we can have a lime green Farrari. You'll notice that as I do this it updates the displays and it changes the price and the text and you'll see that there's some features on some of these cars: I think the yellow car features starburst paint. They're all updating nicely in the background. As a website developer, and a themer (and bits and pieces) I've done nothing to get that working out of the box. It's just there. It just happens. It just works. No effort involved. Straight working, day one. [so why can't I do it?: because there are no instructions. Will the nice man explain?]

The other thing that we are going to do, if I actually add this car to my cart - we'll just jump across to the checkout. We've got our starburst Farrari here at $59.95 . We've got some shipping in here. There's no [?] doubledation on this. Whatever. We're not going to talk about that today but it can be done. We've got some shipping and we've got two different shipping rules. If you've got a product that you want to sell for less than $100 - or less than $50 in this particualr store - you'll get $15 shipping charged. And when your cart value is over $50 you get free shipping. So the idea is that you might want to give some particular shipping to some people, or if they are some kind of VIP customer or things like that: all sorts of things that we can do. We can go right through [as a customer], confirm, put in some payment details, and then magically checkout is complete. I can view my order, and see what I have bought. I can go into my account and see what I have bought before. I've got a few orders in there including one that's been deleted and one order that's been completed. I can come in here as an admin; view some orders. See what's been - ordered. I can delete an order. I can modify the payment details. These are some of the things that you can do with Drupal Commerce straight out of the box, mostly, without too much work.

Understanding the Workflow
Install Commerce>>Confirgure Currency>>Configure Tax Rates>>Build Product Types>>Add Sample Product(s)>>Build Product Display>>Configure Shipping / Payment methods>> Add more products and displays>> Test and Launch?

So
how to we go about actually getting from a base install to something that is relatively functional; which we can use to delivery an e-commerce product to our customers?

So the first thing that we do is that we
install Commerce. Relatively straightforward.
Then we
configure the currency settings. By default Commerce installs, running in $US. Not that that's really a problem, but you probably want your store, if you're in Australia, to be running in Australian dollars.
  • We set-up some tax rules and tax rates.
  • We build our product types - and I will explain a little bit more about what that is in a moment.
  • We add some sample products.
  • We build product displays.
  • We configure shipping and payment methods.
  • We finish populating our store.
  • We test it to make sure it's working right
  • Then we go live and we make lots of money because everyone makes lots of money when they launch an online store. [laughs]

Understanding Rules
Rules govern the operation of each element of the store - including calculating prices, discounts, checkout steps, add-to-cart rules, confirmation emails, user registration.
The first thing about Drupal Commerce is that it makes use of standard Drupal ways of doing things. So there are some key components of Commerce which live in the background and aren't immediately obvious. They make Commerce work and really really sing when it comes to Commerce being a good ecommerce tool. The first thing is Rules. Rules drive Drupal Commerce. Rules are your business logic that detirmines how your ecommerce store works. So you have Rules to calculate tax. You have rules to detirmine whether you can add a product to your cart. You have Rules that set what shipping method you can choose. You have Rules that detirmine whether or not the user is allowed to check-out. You have a Rule, and there's actually a screen-shot of one here, that detirmines what emails get sent to the customer when they purchase the item, and whether or not you as a store admin get the email. You have Rules which integrate Drupal Commerce with your back-end ERP system. So if you have something like AdEmpire [?] or you're making use of a financial package like, say, Zero or Sassuu or something like that, someone can write modules that interact with those Rules, so that, say, when you place an order it triggers the invoice to be created in Zero, the payment to be recorded, and all of those thing fit together very very nicely. Now: no-one has done that yet, but it is entirely possible within the way that Drupal Commerce works.

Understanding Views
Views display (almost) every part of the store - including order lists, the checkout, shopping cart and product listings.
The next thing to say about Drupal Commerce is that it relies heavily on Views. So Views is a way of representing data within your website. You can have Views that display nodes; you can have Views that display all kinds of different things. One of the neat things about Drupal Commerce is that pretty much whenever it displays a list of stuff, it is using Views. So if you want to change the columns that you see... One of the common things that customers say to me is that "We've got our web site, we've got our admin section; we've got our product listing, and we want to change the order of things". So: take something like Magento. You can print a picking-list out of Magento, which my default shows the product code, product name, price, and that's about all. And if you want to change that, you've got a change a bunch of stuff:
- you've got to change a bunch of XML files
- you've got to change a bunch of PHP files
- change the way that that all comes together. It's a little bit messy and a little bit nasty.
With Drupal Commerce you jump-in, you edit the View; you edit the column, and you're done! It's really nice. Really really easy. You want to display the SKU, so the part code appears in the shopping cart: you just go-ahead and you add the column. That's the way that it works. It's really really nice because it makes use of standard Drupal features, that people who are used to building and assembling Drupal websites use every day and night.

Understanding Products
A product is an item you want to sell, and is an "entitity". A product contains all the important details about an item, and there is generally one for each part code in the catalogue.
The next thing to say is that Products are not Nodes. If you are coming from a Drupal 6 mind-set, where everything is a node, it's really important to understand that products are not nodes. Products are products, and they are displayed using nodes. We'll talk about product displays in a minute. A Product is essentially a group of fields, which is a group of information about a product. So a Product must contain an SKU - which is a part code; a product must contain a name, and a product can (but doesn't have to) contain a price. Most products will contain a price. Although some people want stores where they don't actually want to sell anything - they just want to put products online. So those kinds of things are there. But say you wanted to record the colour of an item. You can add a field to your product type that has a colour in it, much in the way that you can add a field to your content type to record the information. But they're distinct from product types.

Understanding Product Displays
A product display groups one or more products together for display, and is a "node". Product displays usually contain descriptions and formatting rules.
Prouduct Displays groups products together into logical groups. So an example which I have been (kind of) thinking-through is... Say I was an Apple reseller, and I wanted to sell Iphones. There's currently eight or nine different models of Iphones you can get. But want I want to do is have someone come to my online store, and be able to pick-up, or go to the Iphone page and have all of the different options listed there together, so there is one page for them to go and see. I don't really want them to go to a page that has the 34gig Iphone, the 64gig Iphone, and black and white - and there's way more than six models I've just realised - I want them all grouped together in a single node. So that's what a Product Display is: it groups products together in a form for display. And you can add extra information there. You can add descriptions - in fact, any field you want to add to a product display, you can.

Understanding Currency
Multi-currency aware. Products can be priced in more than one currency. Currencies can be selected based on rules.
Currency is the next thing we are going to talk about. Drupal Commerce is actually is multi-currency aware. So if you wanted to sell products in Australian dollars and US dollars and  New Zealand dollars and British Pounds, and Yen, or whatever it is you want to do, Drupal Commerce on day-one out-of-the-box supports multiple currencies. By default it has not way of converting between currencies, so if you put prices in in Australian dollars, it won't go and work out what the price is in US dollars or something like that. But there's no reason why you could not do that, if you wanted to. Most people probably wouldn't want to do that because they want to sell in nice numbers, so they want to sell at $49.95 in Australian dollars and $199.99 dollars in the US or however that works.

Which currency people see can be selected using Rules. There are modules which will tell Rules what country someone is in. Rules will detirmine on the basis of that what currency someone should see when they look at your store.

Understanding Taxes
Taxes are very flexible. Consist of Tax Types and Tax Rates. Fully managable by Rules.
The other thing that we'll quickly touch on is taxes. In Australia taxes are relatively boring. There's just one single tax for everything and that's called GST (Goods and Services Tax). It's about 10% of the product price. Most of you probably deal with that when you deal with everything you buy. In other countries there are other tax rules. But say you wanted to sell houses using Drupal Commerce. In New South Wales where I am from, we have this thing called Stamp Duty. Stamp Duty is 1½% of the sale price. So you could have a tax rate for Stamp Duty within Drupal Commerce, know when to calculate that Stamp Duty using Rules, and correctly apply it to the products, using  Rules, all automatically, without having to do anything. So you can have mulitple tax rates, multiple tax types; you can display prices including, excluding: all those types of things. You can have taxes not on. In fact - a kind of self plug here - the Commerce Australia  module which you can download from Drupal.org, it has a rule in there which says "If you are in Australia, charge GST, and if you're not in Australia, don't charge GST", because if you ship the product outside of Australia then you don't charge GST on it. When I used to run a website in OSCommerce, that was a big pain whenever someone placed an order from New Zealand, because we had to take the GST off and modify it and a bunch of things like that, and it didn't do it well, and then we tried it in Ubercart and it was even worse. So it just works out of the box, day one. Great.
22
So lets actually get-in and do this. We've got 25 minutes from now. Maybe some time for questions. By the way, feel free to stop me at any time and ask questions on what we're doing.
  So
This is the website we've just installed.


The first thing we're going to do is actually not jump into configuration but jump into modules and the first thing I'm going to actually do is I'm going to install the module filter module, simply because it makes my life a lot easier. If you've worked with a site that has lots of modules and you've never found the module filter module : what it does is it changes the display of this page and puts all the modules down on the left hand side, which is really handy. It's kind of quick.
  So
The first thing that we're going to do is we're going to install the GST (Goods and Services Tax) module, and while we're at it we'll probably also install the currency display . They're part of the Commerce Australia module. What they do is the GST module sets-up the GST rules , and Currency Display makes it display Australian Dollars with a $ sign. That's pretty much all that they do. Basic but important.

Now we are going to
>>Configure our Store [from the admin menus].
  So
The first thing that we're going to do is: we're going to set the currency. We're going to jump-in here. We're going to change that to Australian dollars. You'll see the default is US dollars. Because we're in Australia. What that's done is that it has enabled the Australian currency in here. But we no longer want to have US dollars available for our store so we will just turn that off.

OK:
First step done.

The next thing that we'll do is we'll just have a look at the taxes. We don't need to do it because the Tax Rates have already set it up for us. We have a Tax type here: it is called "GST". We have a look at it. It displays taxes of this type already included in the price, it has got some rounding rules, it is called "Goods and Services Tax". And we've got a Tax Rate which is 10%, which is actually the GST because that's what GST is. We can make it 20%, 50%, 150%, -0.1%: all sorts of things. I don't know why you would ever want to do that but you can! I am sure there are countries in the world where that's an important option to be able to have.

OK: so
That's our basic Configuration.

The next thing that we're going to do is: we are going to
>>build our Products.  [product types]

We click on View Products and there's three default products in, because we clicked on Commerce Kickstart install and told it to intstall demonstration products.

Our Farrari store is going to sell cars, so we want to go and configure it to sell cars. So the first thing we are going to do is: we are going to add a product type. We're going to call [in the NAME box] it a car. We are going to make it [typing in the DESCTRIPTION box] "a really good car that we can sell". And we are going to save and add some fields [on the MANAGE FIELDS tab]. So you can see: by default we've got the SKU - that's the part code.  We've got the title. We've got the price which we could delete if we wanted to. We've got a status which is whether or not a product is disabled, or something like that, so you can just disable the product. And what we are going to do now is that we are going to add [ADD NEW FIELD] a field for colour.  It's going to be a list of text type: a select list. We'll save that. This is relatively manual, but we are doing it for real so we will go-through [with it]. An allowed value list. Here is one I prepared earlier (you've got to take some shortcuts!). Now we'll save that . And that's done.

The other thing that we're going to do is that we are going to add some features for our cars which we want to sell. So we're actually going to make it a text field and we are going to allow multiple values once we get through. [presses SAVE FIELD SETTINGS]. Ladada dada.  [NUMBER OF VALUES] Number of values: unlimited. And of course we want a photo of our cars here. There's an existing field which we can use called a product image [near bottom of the screen] which we'll just drag-up and we might actually put that there. We'll put it in after the price because we can. And we'll save it as an image. It doesn't have to be "required". OK. That will do. We can play with the settings a bit later.

OK: We've got a product type.

  So
Lets go and  
>>add some Cars.

So - There's a quick navigation-bar-thing here. I click on add a product. We've got two options. I could click on a standard product. Or we are going to use the product type car. Call it F1. We'll call this our red Farrari. We'll sell that for $49.95 including GST: a bargain Farrari. Get them while you can. Limited stock available. We'll go for our red Fararri [image]. We'll set the colour to be Ruby Red. And this one can have Magnesium Alloy wheels. And we'll save and add another. We'll repeat this. F2: this can be our pink Fararri. We'll sell this one for $59.95. In case you're wondering why we have a pink Fararri: I asked a bunch of people what colour Fararris they wanted and  and Donna Benjamin said she wanted a pink Farrari, so we got that. [select] Penultimate Pink. This is going to be just for Donna. We'll save and add another one. Product SKU: we are up to F3. I think - I don't know what colours I have left. We'll go for colours this way. We'll go for a lime green Fararri. This is because Peter said he wanted a lime green Fararri. We'll call this "Lime Green Farrari". We'll sell this for $199.95 - it's a bit of a preimum model. We'll upload the image because I forget to do that sometimes. It is lushiously good lime green. That is alliterarion for you, in case you didn't notice. This one has no features because it is boring. And the last one, which is actually my favourite: this is my yellow starburst Farrari. Sorry if you are a Fararri lover. We are going to sell this for $499.99. We're going to add my starburst Fararri. And you can see it there: beautifull! It's yellow with red starbursts all-over it. [COLOUR DROP-DOWN MENU] It is a Yamourific Yellow Farrari. [FEATURES MENU IS PLAIN TEXT WITH A + SIGN TO ADD EXTRA FEATURES] Features: Starburst Paint. And while we're here we'll add another feature. A four-wheel drive Fararri. That sounds great!

OK: We've got four products. They're in our store. But hang on a second. They are not showing-up. Does anyone know why they are not showing-up? Yet. Yes: that's right. Those Fararris are not showing up in a product display.

   So
We are now going to
>>add a Product Display
.[Add Pruduct display on the 2nd row of the menu]
We are going to call [TITLE field under Create Product Display] it a Fararri. [BODY field] "Fararris are cool you should buy one". (There's a reason why I don't write copy). And here [PRODUCT]: this is where we set-up our links to our products. So we've got an F1, an F2, an F3, and an F4. So you can put as many fields as you want in there, separated by commas. It's an auto-complete field. It's nice. It just works. You can have one; you can have 10. It doesn't matter. You can have 100 if you want it. I don't know what it performs like if you have 100. Probably still fine. And we'll save that. And we'll save that. Good. OK.

And here's our Fararri. It's red. I can choose "yellow starburst Farrari". I wanted to do this so that I could show you what the yellow starburst Fararri looks like in all of its glory. And I just selected that here: and you can see the features updated; the image updated, the colour updated. I haven't done anything particularly special to make that happen. We've just added the fields to the product type. We added them to the standard product display straight out of the box. And that's what happens and that works. OK? That's cool.

Now: we are going to do a couple of nice little things. We don't actually like the product image being that big. So we are going to format that a little bit. We are going to manage the display. The default display of the product image. Now: this is where it gets a little bit messy.

You modify the display settings for each field on the product-type display settings; not on the product display settings. There are some things you modify on the product display, but these ones you modify on the product type.

So we are make this one - image type - we are going to display a medium image because it fits nicely, and we are going to hit save. Close that, and the page refreshes. And there we go. OK? Alright so far? All good.

So the next thing that we are going to do is:
we are going to come-in here and we are going to modify our shopping cart a little bit. I mentioned that this was all built around Views. So I'm just going to give you a little example of what sort of thing we can do. We are going to edit the view here. And what I want to do is: I want to add the product code into the shopping cart. So that when I come to see the cart I can see what the model number is, at the shopping cart stage. So we are going to add a field. And we are going to add the SKU field. Hang-on: that's not on the list. This is the first little bit of magic which I am going to show you. We are going to cancel out of there. We are going to use the relationships [menu] to add a relationship to the Commerce - to the Product. Er - that's not actually the one I want. I want the car. Hang on. No: maybe that is the one I want.  Add and configure relationships. Apply. OK. So we've got a reference here, theoretically, to the product. So when I come in here and select a product and choose "add", I should now have an option for SKU. There we go. It's in there. Product is linked. That's where the relationship is. Create a label. We'll rearrange that. And we want it to appear first because that's a nice place for it to appear. We'll apply that. We'll save a View. Come back. And there we've got the SKU. Product F3 is in our cart. And if we want to show Features of our product plugged-in there, or anything like that, we just follow exactly the same process. So if you wanted to: if I come back and add a red Fararri to my cart, and I come across to the checkout, and I want to show the colour in here, I could do exactly the same thing: add the colour field in the column using Views and it all happens nicely, all straight away; no particular work to make that happen. OK.
That's pretty much what we need to do.


  So
The next thing we are going to do is we are going to play with  
>>Shippingand shipping is the first time when I'm going to show you a little bit about how Rules works to configure the logic of our online store.

The first thing we're going to do is we're going to jump-in to Modules.
We're going to grab the Commerce Shipping Module,
We're going to turn-on the flat rate module, and the base shipping module.
And the Shipping UI (user interface) because that's how we configure it.
And we're going to save these things: click save configuration....
...whenever you are ready...as I said: if anyone is willing to buy me a faster MacBook Pro, I'm all willing.
So we're going to configure our shipping we click on Configure Store, come-in: click on Shipping, and that's all relateively self-explanatory. [moves to second tab called shipping services]. And what we are going to do is: we are going to configure two shipping services. We are going to configure a shipping service that is [types in title field] Standard Shipping, which we will call "standard shipping" [in the Display Title field]. We'll sell it for $15 including Goods and Services Tax. We'll save that.

We are also going to add a service that is free shipping ; free shipping, $0 including GST, flat rate. 
It could be $0 including GST: it doesn't really matter.

And now when we come in here [to the cart?] all of a sudden we have got our shipping information - and we popped this [delivery address] in last time. And we've got options! We can choose our shipping costs. We can get free shipping or standard shipping. I don't know why I should ever want to choose standard shipping if I've got free shipping as an option, so let's now build some rules which detirmine when those should be displayed, and then we'll test them, make sure that they work, and go from there. So we'll click on shipping. Click on shipping services. And we are going to use this configure component link to modify the rules which detirmine when this gets displayed. So for free shipping, we are going to add a rate for shipping service to an order, but only when we do a data comparison, and we discover when we discover that the commerce order - commerce order total amount - is lower than (hang on: we are doing free shipping aren't we? We'll do it this way) ... is lower than: what do you reckon? $150? OK.

Worth knowing a little trick of the trade: when you do this dollar comparison it is done in cents; not done in dollars. Now, this particular rule isn't multi-currency-aware and that can be done but that's just too complicate dso we won't worry about that. So if the order is less than $150 we don't actually want to give them free shipping; we want to not give them free shipping. There is a reason why we did that. I'll explain in a moment.

We'll come-in and we will make the opposite rule for the standard shipping. Add condition. Data comparison. Commerce Order: Commerce Order Total. Amount. We are going to click Continue. "Is lower than $150": that's what we set it to - right? There we go. It's there. And we'll leave that there.
   Now.
The reason why we set one rule as "less than $150 - NOT" and one rule as "less than $150" is because there is no less-than-or-equal comparison for the data comparison rule. That's the only reason why we did it that way. So if someone buys $150-worth of something: if we set one [rule] to be less than $150, and one to be greater than $150, and you order something worth $150, there's no shipping available to you and that's just a bit of a pain. That's why you do it that way. You could have quite complicated rules. You could have multiple conditions; you can have "or"s, you can have "and"s. All of those sorts of things. You can nest the conditions against each other, and pretty-much anything can be compared, and Rules is way-complicated, and there's brilliant screen-casts online. If you are writing rules, go online: watch the screencasts. And then when you are thoroughly confused, jump on IRC (internet relay chat): that's the way to go.

By the way, while we are here: if you're looking for an IRC client and you're on a MAC and you haven't found one that you like: there's this great thing in the App. Store called Textual. I found it this week. It actually makes IRC usable in my opinion, so I really like it.
   So
We've now got shipping in our store. And lets just prove that that works. We've got free shipping on this order. So let's go back, and let's modify our shopping cart, which presumably I can do by clicking here and press cancel. And coming in here. And it was $150. So lets just cancel one of these. So they're going to charge me shipping on my Fararri: what a rip-off! Seriously. (I could have just changed the quantity but I removed a very expensive item from my cart). Now my order is only - whatever it was - $15: give it a go. Now we've got Goods and Services Tax on there; it's got shipping at $13.64 ex-GST. You can change the order of those fields. We''l talk about that later. Pop-in a payment. Continue to the next step: order done! We are actually done! We've built our online store. It's fully functional. Beginning to end in under 25 minutes.

Just hang on a second. We'll get the microphone.


Q: Can you configure the shipping cost based on the post code?
A: Yes you can make the shipping - built on any rule. So you can do
- instead of a quantity-based comparison -
you can do an
- address-based comparison -
much in the same way that we do an address-based comparison to detirmine the tax rate. So I'll show you what the rule might look like, based on the tax rule. Here's the other place you can get to rules: configuration > workflow > rules. So this is just using the Rules module that's built-in to Drupal. And so in here we have a "calculate taxes GST" rule, and it's a general rule. We have an addition that's an "order address component" comparison. In here we've got "commerce line item", "order address", "country", bla bla bla bla bla.

Keep in mind that you're using the flat-rate shipping module here. Most of the time if you're using postcode-based shipping, your shipping is probably calculated from an external service like Australia Post Shipping Calculator, or you're making use of (in Australia) Star Track Express, or TNT, or any of the other big shipping companies, and they can expose their APIs (application interface) which they can expose. Then someone can write a module, (whether that be yourself, or someone that knows stuff about writing modules - whatever that is) - to integrate those things together. There is an Australia Post module in sandbox on Drupal. I don't know if has been released. I don't know if it works.

Q:I just have two questions for you. A: Yes. Q: One is:
If you currently have an existing site in Drupal 7 and you want to turn it into a Commerce site, how relatively easy...? I mean from what I've looked at it looks pretty relatively easy to just drop the Commerce modules in there and then turn those nodes into products?
A:Yes. That's pretty much all you need to do. (Q - I'm sorry: go-on.) A: And then the thing to keep in mind is that there are dependencies for the commerce modules so you will also be running CTools, Views, Rules, and a bunch of things like that, which most people are probably be running anyway.

Q: And just one other question:
If you've got a site that is currently in Drupal 6 / Ubercart (A: I'm sorry!) (Q: Not as sorry as I am: I've got wo work with it!) What would your recommendations be for getting into Commerce? Just literally starting fro scratch again?
A: Yes. I'm talking about this with one of my clients at the moment who has a quite heavilly-hacked version of Ubercart running their website. It's running a slightly older version of Ubercart that hasn't had security patches applied to it for a little while which makes me a little bit nervous. So we are talking about the fact that we need to get to Drupal Commerce with them at some stage over the next year, and we are going to re-build it from the ground up.
Q: [inaudible: about transferring data from Ubercart to Commerce].
I imagine it would be a relatively trivial module to export from Ubercart to Drupal 7 Commerce end-of-the-world. No one has written it yet. I have spent a lot of time looking at the tables in Ubercart and they're not all that sophisticated, so it could be done, but it's not something that... - it's probably not something for the feint hearted.
We are going to re-input all the products; we are going to re-input all the data, re-create the users. And, you know, that is a problem with choosing to run your business logic out of a web-based ecommerce platform: what is the upgrade path?

The guys that wrote Drupal Commerce were also the guys that wrote Ubercart, and in one of the rist presentations they gave publicly on Drupal Commerce, the very first thing that they said was: "Sorry". Ubercart is great provided it does what you want. If it doesn't do what you want then it's a little bit messy. The migration path is not very nice. Same with Drupal Commerce though. There are a lot of things it doesn't do. I started using Drupal Commerce when the first RC (request for comment) or Beta was released about 12 months ago. We half buit a site and got stuck because we discovered that a bunch of things weren't working and we stopped. And a lot of people have started working with Drupal Commerce just a little too early. I think in the lst three months is when it's really got to a point when it's mature enough that most of the things that you want are mostly there and mostly working. But it is a work in progress and the community is quite happy to help, so: get online and contribute.

Q:So where is all the link to the payment stuff? Does it link to Paypal and where do you configure that?
A: I haven't turned-on any payment methods in this example store, except for the example payment method which is turned on by default. There is a Paypal payment method. There is an Authorize.net payment method. There is Securepay for Australia. There's a bunch of different payment gateways which developers have written and made available on Drupal.org. If you want a payment gateway that isn't there it's relatively trivial to write one to put in there - or find a developer. There's a few good Drupal developers in Australia that work with Drupal Commerce that are happy to write payment gateways if someone pays them, because they have to put food on their table.

I think that's about it.

https://web.archive.org/web/20130413095747/http://www.youtube.com/watch?v=MS2P7PYaZ6A&gl=US&hl=en
http://drupaltv.org/video/building-awesome-e-commerce-store-25-minutes
is another lecture from Real World Technology on how to set-up Commerce Kickstart very quickly. The catch with both lectures is how to install kickstart on a server before the clock starts ticking, or else how to convert a standart drupal installation from something like scritpulicious into a drupal commerce installation. If there's a quick way of doing that - I'd like to know if anyone wants to comment.


Saturday 7 January 2012

I'm probably not concentrating on this properly, but "installing products on Drupal Commerce Bulk Product Installer" seems to be a video about how to use pre-set data, without any instructions for setting-up the data. I hope to crack this, because it's the only Drupal Commerce setup video I've seen that's like a set of instructions for driving a car for the first time rather than a review of how the car compares with others.


I think the cruch is the instruction "So I have this Genre field created here." - how, Mr free teacher? Maybe with enough twiddling I could discover by accident.

Sadly, Drupal Commerce is very weak on bulk product installation as its writers admit, so a video in broken english about how to install data which was installed before the video is a frustrating thing to try to use.

Monday 2 January 2012

installing products on Drupal Commerce Bulk Product Installer

Vimeo.com/34385004 - video -


Hi this is Pedro Cambria from Commerce Guys in another commerce module video. This week I'm going to show you how to use Commerce Bulk Product Creation Module. This was the first contrib[uted] module created for Commerce, and allows you to bulk-create products. Basically if you [...?...] of your SKU, or you can generate your SKU easily by tokens, this module is going to be ideal for you. It manages the creation of the product, but also, when the product variations are created, this module has also [got] options to manage the displays associated with these variations. What this module doesn't manage, as yet, is to edit or modify the products once created. [1']

OK. For this demo I have Commerce Kickstart installed, with these modules already installed: you need:
  • Commerce Bulk Product Creation commerce_bpc, and we see also the
  • [included but to be enabled - "Just to be sure: Did you enable the "Enable this field to function as an attribute field on Add to Cart forms." under "Attribute Settings" in the field settings of the taxonomy fields? This is currently required."] Taxonomy Reference Integration bpc_taxonomy
OK. I have also a couple of product types. If I go to Store>View Products>Product Types tab, I have a
  • Product with a single attribute, and a
  • Product with taxonomy attributes to demonstrate how this module works.[So how do I get one?]
OK. The first thing you need once you have installed these modules is to have a
Field (Store>View Products>Click on product created with a single attribute>manage fields) [2']
or some fields of list type . Also boolian. And if you have the taxonomy_bpc module installed you can do this with taxonomy fields as well. So I have this Genre field created here. It's a list of texts. And here [further down the page in a box] you will see Bulk Product Creation options. We are going to use this field for bulk product creation operations. And we have that field that's an attribute in the cart. So. We have three allowed values [in the allowed values box]

For Bulk Product Creation you have to go to
Store>Products and in the Product listing you will find [just before "add a product"] a link [3']
"Bulk Add Products".]
If you click here you are prompted to select one of the product types you have more than one that are eligible to be created by this massive operation. If you have a product type without any field that is eligible for this, it won't display and you won't be able to use this module. So if you don't have a list field, a boolean field, or taxonomy fields, you won't see the options here.

Let's select a simple one. You'll see the interface of the module. [headed "Bulk add Product with a single attribute" in white, and "Bulk Product Creation Form" in black] Let's go step by step.
  • First you have the Product Information. You can field [used as a verb meaning to fill-in the box or field] the SKU. This uses tokens to generate the values. Let's call it "PRODUCT". On the right side you will see ["example variant SKU PRODUCT --Action"] an example cocaffeinated [?] as an example. It gets these examples [Genres: Action, Comedy and Drama appear] from the combinations. You need to set a price - a fixed price - for each variation. And a Title. That works the same way as the SKU [in being a form field to fill-in]. So you can see an example of how a product is created. You can configure this and we will see that in a moment. 
  • Then you have the combinations. [headed COMBINATIONS in blue]. The combinations you can select. For example if you don't want to get Comedy generated you just fill this out and it won't generate it. Or you can select everything. [all options shown highighted in white on black]. 
  • You also have "STATIC VALUES" [a blue heading to a box at the bottom of the screen]. You have combinations, and if you have fields that you generate as static; it won't generate any combinations for that.
We have create products; we have create products and create product display. So let's create product display in a minute. If you click - this has actually generated three new products. There are the three products that are a combination of our fields.

You can configure how the bulk product creation module behaves. If you go to store>configuration>bulk product creation, you have some options here [on a page headed "PATTERNS" in black under "Bulk product creation" in white]
  • You can define the SKU pattern, [6] with whatever separator you want, or whatever.
  • The Title as well.
  • And you have Tokens support for this. Some of the tokens you can use - title; a combination of values, and also you have the  
  • display node settings.These are very interesting because here is where you decide if you want to create a display associated with the product. You can have the [radio] button "save and create display" [selected], and you will get into a pre-populated display form with the product generated. 
  • You can avoid [destracting attention] from the user with this. You can [as it says on the screen] silently create a display node automatically, so the user won't notice. An excellant way to start hiding the user's display if you don't want the user to see that.
  • You can also create a display for every product. [it says "create a display node automatically for every product created] These [top two radio buttons if either is selected] will create a display for all the products created in a work operation, but this one will create a node for each product; it will associate 1:1.
  • And you can hide the display node fortunately. [this is the last of the 4 radio button options]
Let's use this first option [of the 4]. [Going down the screen to settings for created display nodes] You can also select a content type for the node created.

[Going down the screen past Tokens to "after successful bulk creation, send the user to -"
There's you're redirection. By default you get redirected to the list of products [first radio button] but you can also select a custom location and set the path here. So let's select this and let's...
[8]
...take a look at our other product type. We have a second product type with taxonomy attributes. I created a couple of taxonomies - one for colour and one for size. Size and colour and associated term reference here. So they are exposed to the bulk product creation, and also exposed as attributes in the cart form. OK. So if I go to products>bulk add product with taxonomoy attributes , I will have the same product information here for the fields SKU, Price, Title. Here [appearing to the left of these fields on the form] are the examples of what it will look like. So you have the combination. And here [on two new drop-down select menus below] we have all the combinations we want. If we select all of them we are ending with nine products created, but you could also avoid to create a combination for a small size, or just create it for a small size. If you have many fields, all of the values are going to be displayed here, so you can safely select whatever you want.
[10]
So after the field creation settings, let's create the product and create the display.
I'm going to end. This is the Node form. It created [states "successfully created nine new products"] nine new products. We are in the product display creation form. When you are here you can fill all these fields for the display. And here in the product selection you will have [in a separated list] all the nine products that we have just created. So we save this [presses save; goes to the front page]. We have the product, we have the size, and we have the attribute form created.

So check the whole [node] page [on Drupal.org] for the latest changes because this module is in active development. [11] There is a 1.0 branch that is stable, and all the new features are committed to the 2.0 branch. Bug fixes are of course committed to both branches. Thank you to Sven Laeur for maintaining this module and keeping-up to the active development. And also, if you are using entity reference with Commerce, you may want to check this entity extension; this entitiy reference integration ... which allows you to create values based on the values of the entity reference field.

I hope you enjoyed this commerce sworay and see you in the next one.[answers on a postcard please]

Sunday 1 January 2012

C:\WINDOWS\web\svhost.exe Windows cannot access the specified device, path, or file. You may not have the appropriate persmissions to access the item. I'm using Windows XP and have tried a registry cleaner. This error doesn't seem to effect much except the deletion of certain files, for which I'm using http://www.emptyloop.com/unlocker/. Looking around on the net it seems tricky thing to solve. The problem started when I had both Bitnami and Aquia Drupal Stack installed and continues after removing Bitnami.





Saturday 31 December 2011

hoax

This isn't a good article or a short one; it's just copied out of curiosity.
It was next to one that's quoted in another blog post here about bad teaching by an economics professor who moved from the US to the UK in the 1960s, taking teaching standards with him. He would have read it. The problem of unhappy students and puzzled teachers applies particularly to sciences and economics I think, with economics students the ones to complain.

The problems are
(1) Presumption that entrance threshold exam scores are low - which was true of the Keele foundation year that I signed-up to in 1983 but not of the main degree course.
(2) Colleges for 20-odds ignoring previous work done as teenagers, which was true of Keele economics department. At the time, social science A-levels were often done by repeated essay-writing from original sources; they weren't bad, but we did a bit about X-shaped diagrams in economics A-level as well.
(3) Presumption that you need to learn or teach theory before practice, starting with X-shaped diagrams in economics for example on my university course, going-on to teach them again in year two as the AD AS model, and again in year three as revision. On this system, Mr Morris Lord Nuffield would never have started repairing bicycles in his parents' garden shed aged 15. He would have stayed-on at school for Physics A-level, then gone to some kind of higher education, and only then be allowed to put all the theory together to repair a bicycle at some age like 25. They would have taught how the wheel worked at A-level, then again in the first year of higher education, then possibly in the middle year, and then they would have explained wheels again to the young Mr Morris as revision.
(4) Government getting interested in pointy things, instead of social insurance which is its main job.

Related:
International Student Course Satisfaction
Table of feedback scores for the economics degrees for the universities that take most international students. Most of the courses are at the bottom of the league table for student feedback

Related: Bad Economics Teaching for the twenty-teens from data on Unistats, 2015 Better Economics Teaching: some off-the-cuff suggestions based on being a student in the 1980s  The British Economic Crisis - a similar book to Robert Peston written in the 80s - Star Courses: the least satisfied, most bored and lowest paid UK graduates, written 2015 Bad Economics Teaching: how someone managed to teach economics from memories of an old textbook at the peak of the worst recession since the 1930s, and tried to cover-up for government causing the recession. Journal Articles by Professor Les Fishman - unbelievable beliefs - UK unemployment 1980s


IS HIGHER EDUCATION A HOAX?

Robert Vincent Daniels - US university teacher - 1960

WHEN A RUSSIAN ROCKET blasted itself successfully into orbit in October, 1957, and launched the term sputnik into the international vocabulary, the reverberations were felt nowhere in the universe as strongly as in the American educational world. Americans, presuming that no one else should ever lead them in technology, were convulsed in a panic of national humiliation. A scape-goat was demanded, and education—traditionally the American's recourse as a cure-all—had to bear the onus. This belated concern with the nation's schools would have been entirely salutary had it been less emotional and more thoughtful, less transitory and more profound. The panic has now subsided, and apart from the John Dewey bogey and federal loans to a few science students, it has left no important change. The real problems, which have long been with us, are still being overlooked.

A curious fact about the sputnik panic in American education was the exemption of the colleges from the pangs of national self-reproach. The high schools have borne the brunt—though not without deserving it. Apparently people assumed—and still do—that we need only get the largest possible number of students through high school and into college, perhaps with a push in the direction of science, and then everything will take care of itself automatically. College teachers may be popularly scorned as soft-boiled egg-heads, but the college as an institution commands unthinking respect. Actually, the true merits are the reverse. College teachers on the whole are able, commendable, self-sacrificing in-dividuals, but the system of college education in the United [p355] States is — unbeknownst to most, except the teachers — in a critical state.

There are at present approximately three million students in institutions of so-called higher education in the United States. The numbers of youth aspiring to join them are growing ever larger, thanks to the World War II birth rate and the ambitions fed by prosperity. If the demand can be met, it is conservatively estimated that, in a decade or less, double the present number of students will be studying at what is supposed to be the college level. Quantitatively this is all that the most agitated sputnik alarmists could wish for.

But in the qualitative respect the prospects are not to automatically bright. Americans seriously deceive themselves if they imagine that the stream of college graduates pouring through the open floodgates means the miraculously expanded production of mature and dextrous minds. What do our millions in college really mean, when the college, betrayed by the boggy foundation of the American high school, sinks to the level of a remedial secondary boarding school? Real education is left to the graduate schools, where the same process has set in. They must expand to give the capable secondary-education products of the colleges an opportunity for genuine college-level study, whether of a general or vocational nature. The waste is colossal, in money, faculty talent, and students' time--everyone is taking years more to reach the level for which his capacities destine him. We have not yet reached the end: as the mass of master's and doctoral candidates multiplies in search of a college education, a brand-new rung has to be added to the ladder—"post-doctoral" training—so that a talented few can get the training as experts that they missed before.

I. Democracy and the Right to Education

The causes of the debasement of standards in American higher education are not hard to diagnose, though the cure [p356] may be difficult. Some of the most cherished assumptions about the "American way of life" must be called into question if real change is to be brought about. Our educational system is professedly operated according to the principle that access to education is something people have a right to. Since it is clear that a democratic society most insist on equal rights for all citizens, it follows from the first assumption that everyone has an equal right to go to college, and that any educational selectivity is "undemocratic." No less an authority than the President's Committee on Education Beyond the High School (mercifully, not on "Higher Education") has declared, "This country will never tolerate the nurturing of an educational elite."

Such a proposition betrays a dubious comprehension of the nature of education, even if it renders the nation's will accurately. The idea that practically everyone can and should be educated equally is an irresponsible perversion of the very essence of education. Do the proponents of the Committe's view actually believe that none should be educated beyond the level to which all can be brought, that the lowest common denominator will determine the limits of attainment for all? Undoubtedly not, for it would require the stifling of all specialized and technical training that rests on superior ability, and lead speedily to national disaster. The Russian earth satellites dealt a heavy blow to equalitarianism in the preparation of engineers and scientists.

The President's Committee more probably had in mind the less far-fetched notion that all students should be educated together in the same system, with the more talented continuing farther. This is the usual practice—everyone swims in the some educational channel, as far as his ability can carry him; at any age level, education is the some for all, with special preferment for none. This position is still a serious threat to educational quality, since it disregards completely the importance of sequence and preparation, not to [p 357] mention the varying learning capacities of different students at the same age.

Many educators seem to feel that all persons at a given age-level should pursue the same course and get the same educational "opportunity." The level of work has to be held down where all can manage it, regardless of their ability or future needs. While it is often the custom in large high schools to offer separate college-preparatory and non-college curricula, to many students aspire to college and its benefits (half or more of all high-school students) that the benefit of selectivity is lost. Very little solid preparation is provided for the students who go on to advanced work, even though they may have the ability to undertake such preparation before-hand; the lost opportunities of the high-school years are tragic. The fault lies with the disastrous assumption that the same education is appropriate for students who are ending their education at a given level, and for those who are going ahead. The idea of separate paths is denounced as undemocratic, without thought of the need which a democratic society above all others has for a good proportion of members who have been well educated.

Unfortunately, our society is already suffering and will suffer still more from a dearth of properly educated individuals. The college gets students who
(1) are unprepared because they have been given a "democratic" education, the standards of which have been watered down to the remedial grade-school level; and who
(2) come in increasingly large numbers with increasingly dubious capacity for achieving the objectives of college education.

With these unprepared and often incompetent freshmen the college has to undertake the simultaneous tasks of
(1) giving them the college preparatory material that they should have gotten before (i.e., the function of a remedial high-school);
(2) attempting to give them the college-type "liberal" education (i.e., teaching them to think); and
(3) imparting vocational career training [p358] to them. Any one of these tasks is enough for a four-year institution, even granting the requisite ability among its student body. In combination, and with the standards of student admission and retention being what they are, the task imposed on the college is insuperable.

No wonder, then, that in this age of mass education the capable student rarely realizes his potential. He fails to get in high school the solid foundation of information and skills which he needs for advanced intellectual effort, and which he is best able to acquire at this age. The college comes too late, and with too little systematic concern for the student's basic mental development. The average graduate retains from his college experience little more than could be taught in high school to superior groups, plus some specialized training (the "major") that is too weak, too haphazard, and too un-related to career goals to be of much use. The specific objec-tive of liberal education in colleges (which, if I may dare to assert it, is to make people into intellectuals) proves to be a shimmering mirage.

II. The Aims of Education—In Reality

This state of affairs has certainly not been willed by educators, whatever their philosophies. It is the result of pressure —pervasive social pressure—which the educators and their institutions are in no position to resist. The perversion of higher education has come about in response to what American society has demanded, and the demands of American society represent a perverted idea of what education is for.

While the possible aims and objectives of higher education are manifold, the main alternatives can be grouped into four areas. People can be trained with primary emphasis on preparing them to contribute to national defense and the technical progress of the country; to contribute creatively to the cultural and scientific heritage of civilization; to develop their individual personalities, capacities, sensitivities, [p359] and interests; or to pursue a career and make money. There are two separate choices here—between the individual and the social emphasis, and between material and non-material objectives. Traditionally, American education has been in-dividual and material in its orientation—training the individual for personal advancement and business success. Of late, public concern has also extended to the social ends of material knowledge, thanks to the challenge which Soviet technical progress has posed to American national power. On the non-material side, however, little is intended or ac-omplished save by accident. The common talk of develop-ing the student as a person is rarely taken seriously, and the cultural tradition survives only because individuals are able to exploit it to the advantage of their careers.

The real purpose for which education is usually sought in this country is personal advancement. The college degree is regarded as a ticket for a life-time ride on the escalator of success. Computations have even been made of the actual monetary value of the degree in terms of the increment of income that it brings in over the years. For the female students, as everyone knows, the important objective is not the degree of B.A., but the esteemed degree of MRS. which customarily follows it. The woman goes to college in order to attach herself to a man who has won a fair guarantee of status and success, also by going to college. What is actually important about college work, from this point of view, is not what is learned, but the badge of status which is acquired, and the friends, contacts, and angles that are accum-ulated or explored. The business firm, recruiting its sales-men or its personnel administrators or its glorified decks—anyone who meets the public—cares not so much for the specific training its candidates have had, as for their college-bred respectability (and perhaps for the general intelligence and responsibility which that presumably carries with it). The college man has the mark of upper-middle-class rank, [p360] admitting him to the careers where prestige is expected and confirmed. It is no accident that the armed services, and particularly the more caste-conscious Navy, were so solicitous for the educational background of their officer corps even in the direst days of wartime.

The difficulties of American higher education are attributable to a curious combination of circumstances. Both our democratic professions and our class-conscious practices impose their contradictory demands. Everyone wants to get ahead, and education is the means to do this (thanks not to what it is, but to what it symbolizes). On the other hand, we insist on the principle of equality of opportunity: the educa-tional means for getting ahead must be open to everyone on an equal basis. It is undemocratic, supposedly, to favor one person with a superior education that gives him the opportu-nity to get ahead, while another is condemned to labor among the helots. The same education for all, the exclusion of none, passing marks for everybody, and the submergence of un-usual and valuable talent because the talented must not be given an unfair advantage in the competitive scramble to get ahead—this is what our national ideology demands of the educational system as a whole.

Relieved of practically all challenge or pressure, college students are all too often a spoiled, apathetic, or devil-may-care lot. They choose their courses on the basis of minimum work and the most convenient time of day; content counts for nothing—which does not matter, since it is so promptly for-gotten anyway. After a year or so some students cannot even remember which courses they have taken, let alone any of their substance. Meanwhile, students most kill time while they serve off their four years. This necessity is admirably provided for by the facilities and activities which the average campus offers. Students enjoy a continuous orgy of fraternity socializing and alcoholizing, punctuated with spectacular mob celebrations. [p361] The colleges lead the whole nation as far as spectator sports are concerned, ranging from mock war on the gridiron to the vicarious eroticism of campus queen elections. With those who actually play the game we are not here concerned, since they are less students than paid performers, honest members of the university service staff, to to speak. The social and athletic side of college is indeed so successful that millions of additional students, who are devoid of intellectual interest and otherwise would simply not have bothered, are drawn by the lodestone of the ivy-covered Elysium. They cannot resist the attraction of the four-year pastoral idyll of academic life, and come surging through the gates to join the big picnic.

But as the student totals are swelled by everyone in search of social status or amusement, there are untoward consequences even for those to whom education is but the ante-room to success. As the number of people gilded with the veneer of higher education multiplies, the market value of a college degree gets watered down. There are, naturally, only a limited number of positions at each level in the hierarchy of success and prestige, but more and more people are getting educations and competing for these positions. Naturally, for any given position the people with the most education have the advantage; as others seek to match their rivals, those with still more education will be preferred. The typist for whom a high-school diploma used to be more than enough now gives way to the girl fresh out of junior college or the secretarial school; the clerk must now have all of college behind him; the office manager who formerly did fine on four years of college must now have a graduate degree in business administration; and so on. In short, the educational price of social and occupational status is being bid up and up.

This is hardly the end. The democratic principle still operates. As it becomes necessary to have more education to achieve a given level of success, the cry goes up to broaden [p362] educational opportunities and lower the undemocratic barriers of prerequisites and admission standards. High school must be made available—and passable—to everyone; hence, high school is reduced to the grade school level. College must be made available to everyone who wants it, or thinks he wants it. Some people think that because they are taxpayers their children have a legal right to go to the state university regardless of their merit. College accordingly sinks to the high-school level. We are witnessing a process of educational inflation. More and more people spend more and more time (and money) getting education that is poorer and poorer, in order that all may compete on a democratic basis for the preferred positions in a social hierarchy. This is the force which is driving American education into the dismal swamp of mediocrity.

III. Consumer Sovereignty in Education

Economists employ in their jargon the expression "consumer sovereignty" to denote the situation in which the nature of what is produced and sold is determined not by some outside power that thinks it knows best, but by the preferences of the buyers - in other words, where the customer is always right. In an all too literal sense, this is the state of affairs in American higher education. Educators have not only lost control over whom they admit and the prerequisites for higher education; they have also lost control over the nature and quality of their own instruction.

The student-customers are accorded free choice of institutions, curricula, and courses. Thanks to this unrestricted selection of educational tidbits in the academic supermarket, no one is in a position to see that students get a balanced diet or the proper amount of roughage. Items which are hard to swallow simply will not move: subjects which are not pabubated for spoonfeeding, but are instead presented in their true nature as difficult challenges, will go stale on the shelf for [p363] lack of takers. For the student it is all the same: the credit hours are totalled up, whether they come hard or easy, and the prestige embodied in the degree or the husband is proudly carried off. College faculties appear to be incapable of making students do that is good for them. Students cannot be driven with any discipline through a course of training that is hard, unpalatable, but in the end rewarding.

The prevailing attitude toward the educational process among educators themselves and especially among administrators in institutions of higher learning is no different from the industrialist's view of his manufacturing establishment. The college is in business; students are its customers; credit hours and degrees are its product. Operations of the enterprise are guided strictly according to the rules of business: strive to boost output and sales (enrollment and degrees); maximize profits (the contributions, appropriations, and prestige which accrue to the institution); endeavor by all means to keep production at capacity, and lower the price (standards of admission and passing) if part of the plant is in danger of stand-ing idle for lack of customers.

Successful operation of the educational enterprise depends, in the last analysis, on the appetite and good will of the customer. Since the customer is always right, nothing can be done which will offend him. The student must be "sold" on his courses. If instructors insist on standards that are unreasonable, the students will go elsewhere, and enrollment will drop. This is disastrous, since enrollment is to often taken to be the supreme test of educational success. Any instructor, department, or branch of a university which tries to make its instruction rigorous is likely to be passed over by the multitude and perhaps forced out of business.

Thanks to this overriding concern about the customers and the enrollment, it is difficult to hold college students to meaningful standards of achievement. Apart from the self-motivated few, no more than to pathetic minimum of work can be [p364] evoked from them. Difficult assignments like the writing of papers cease to be imposed. The test of a teacher is his popularity—which at some institutions is literally voted on by the students: the successful teacher is the clown. Higher education has become a juvenile branch of the entertainment industry.

IV. Academic Entrepreneurship

The blame for the lapse of standards in the colleges does not lie entirely in one direction. It must be shared by the educators themselves, since they are responsible for allowing themselves to be cast in the role of hawkers of educational merchandise. There are extenuating circumstances, to be sure--particularly the impossibility, with the mass of raw material that college teachers have to contend with, of making headway toward the college's traditional objectives. So faculties have found another outlet by going into business. Tremendous energy is often devoted to expanding the enterprise, building the department, developing new fields of instruction. More buildings are demanded; more institutes, more programs, more courses, are added, with little regard for the number or needs of the students, who are only the excuse and not the purpose for all this effort. Quantity rules over all: maximize the enrollment, maximize the budget, maximize the staff, maximize prestige, maximize "research" (for the sake of prestige), maximize power. Such are the governing values of the industrial bureaucracy which administers the modern American factory-university.

In sympathy with the educators thus ensnared in a world not of their own making, I should point out that they seem often to be driven to this behavior by the otherwise totally unreal nature of the milieu in which they work: serious men surrounded by gawking juveniles, going through the motions of an educational operation which has lost most of its meaning. Campus politics are probably so bitter because the faculty [p365] have no other adult arena and the alternative is to lose their minds.

The often dismal state of teachers' morale tragically compounds the damage to higher education. Faced with a near-hopeless task in dealing with their students, faculties have turned away from it altogether, to concern themselves not with education but with the impressive elaboration of their institutions and programs. Courses are given for the sake of the courses and of appearances in the catalogue; students are not the object but merely the excuse. Sometimes the excuse breaks down: Acre was the case of the well-known university which hired a professor (against the wishes of the department concerned) primarily for the purpose of offering a specialized course on a certain exotic area of the world, only to find when the term began that not a single student wanted to sign up for the course! This is just an extreme case of the proliferation of specialized courses and programs, packing and merchandising fragmented bits of useless and soon-to-be-forgotten knowledge, while the fundamental task of educating the hapless, confused, unprepared students is completely lost sight of.

The modern American university is taking more and more students, who demand and receive admission for purposes of their own, and using them for purposes of its own. Neither purpose—neither the students' competition for careers with prestige nor the faculties' drive to build their enterprises—has very much to do with education. The two sets of purposes do, however, dovetail; student and faculty purposes facilitate one another's achievement, while both work to exclude real education from the process.

The trouble is deeply rooted in the underlying values of American society. Education—real college-level education of the thinking process—is neglected because people are not really interested in it, or because other interests are allowed to overwhelm it. The interests and values which are responsible for perverting higher education are, to be sure, difficult [p366] to check: they prevail throughout our society. They are nothing more nor less than the interests and values of competitive success in a world of big organizations. Students and faculties alike have succumbed. The university, in this society whose every facet is industrialized, has truly become a diploma mill.

V. Mass Education Versus Selective Education

If higher education is to mean anything at all, it must become a serious business: the strenuous development of stu-dents with the requisite capacity. Anything else means tremendous waste—as at present the time and money of the average student is wasted in a drawn-out, low-standard education, and as the time and talent of the superior student are wasted by the same thing. Education must be hard work.

Furthermore, the educational goal must itself be stated anew. Education is provided by society for a social purpose. It represents the cumulation of aeons of human effort and experience, which is far out of proportion to any payment the individual may be making for his educational privilege. The purpose of higher education should properly be thought of as the preparation of talented individuals to render as best they can a social service and make their maximum contribution to society.

This position is not incompatible with democracy; it is essential to take this view if both democracy and education are to survive together. Currently education is most often regarded as a right, from which personal benefits accrue. From this foliows the basic fallacy that education must be made available to all on an equal basis. Actually education (particularly higher education) should be regarded as a privilege, carrying with it definite obligations. The aim is not an "elite," but a democratic society whose talented members have both the ability and the sense of obligation to make their [p367] most effective contribution to the material and spiritual de-velopment of the whole. We will get nowhere if we do not recognize wide differences in individual abilities. Differences are especially wide in the particular ability which is (or ought to be) the foundation for "liberal" education—the ability to conceptualize, i.e., to use abstract ideas, to make inferences, to generalize, etc. Hundreds of thousands of students now pursuing liberal arts courses are wasting their time and their parents' or the public's money (except from the standpoint of social success) because their abilities simply do not run in this direction. It is also essential to recognize that the effective training of superior students must begin early. It is too late to wait until college, when even the capable students must lose time in remedial courses. In mathematics, English, foreign languages, and history, foundations must be laid down and abilities trained for many years before. The time for basic memory work expires before the end of the high-school age: students who have not learned spelling, grammar, dates, geography, and the multiplication table by that time will never do to with any ease or rapidity. College cannot really be what it claims to be unless its candidates have been rigor-ously and specially trained beforehand. We most face up to the obvious implications of these natural conditions of the educational process. Education of the college type has to be much more selective than it is now, and the selection has to begin much earlier. It is unfair both to future college students and to those who do not go beyond secondary school to expect both groups to pursue courses which are the same in content or equal in intensity. This means that high-school students most be channelled into more clearly distinguished curricula than at present (or into separate schools where feasible or advisable), and especially that the standards and requirements for the academically-bound students must be radically stiffened.[p368] The immediate future and the problems which it poses for the colleges point to an obvious first step. We now are in a crisis of too much quantity and too little quality, and the prospect is a sudden doubling of the quantity. Both the quality problem and the awesome problem of expansion can be attacked if the colleges simply refuse to expand, refuse to admit any larger numbers of students, keep the excess out by raising entrance requirements—or, more often, by re-estab-lishing entrance requirements. We are at a critical turning point. It is quality or quantity—education or the diploma mill. The choke must be made, and made quickly. The coming increase in the college-age population brings a hidden blessing—the chance to raise standards without the embar-rassing necessity of decreasing present enrollments. If this chance is not taken—if the country insists on expanding college facilities to take care of everyone who wants to be ad-mitted—higher education in the United States, with isolated exceptions, will be done for.

VI. Adapting the Colleges


If we grant the essential condition of holding fast on the en-rollment front, then the creation of a selective, effective, and democratic liberal education will require three major changes. One concerns the problem of mass education in the secondary schools, and how to square this with the need for college prerequisites. The second is the revision of college organization and instruction. The third has to do with society's attitude toward education and the student, and how he is selected and financed. Providing a really effective college-preparatory course at the secondary school level, with separate instruction and higher standards for the college-bound students, appears to be a task of staggering difficulty. There is a temporary remedy which suggests itself when one recognizes that most of what the college does in the first two years could and should have [p369] been done in high school. The solution is to short-circuit the latter by making a general practice of admitting all college-caliber students (measured, one must hope, by a standard higher than the present) into college after, say, the first two years of high school. Then introductory college courses would commence, taught, as they have to be even now, without assuming any prior foundation. The advantage is that two additional years would be gained for serious study. We could take these two years plus what are now the first two years of college and give a reasonably sound liberal education, with-out intruding upon the ground of specialized or vocational study which is now attempted in the college major. The latter, in turn, would be freed from the encroachments of general education, and could and should become a much more serious, effective, and practical undertaking, handled, perhaps, on the intellectual level of the present master's degree. Equally important with student standards and background for the attainment of a genuinely effective system of higher education is the revision of the present organization of in-struction. College curricula are now for the most part hopelessly fragmented and bogged down in the quantity mania of courses, grades, and credit hours. There should be a single basic curriculum: teaching how to think. Thought-processes must be imparted in a systematic and coordinated way in everything the student studies. There is nothing more ridicu-lous than the established practice of dividing a student up four, five, or site ways among as many instructors and having each go to work on him without any relation at all to what the others are doing. Finally, there should be no wide range of electives and specialties until professional training is undertaken. There are certain things which every educated person ought to know about; the faculty knows what these are bet-ter than the student does; and it is these studies which he should pursue as directed during his period of non-professional liberal education. [p370]


The last requirement is simple in nature, if not in application. Higher education is hard work, or should be; it is given in the interests of society as well as the individual, or should be; it should be open to all on an equal basis, with ability the sole criterion of qualification. Granting these conditions, all serious students deserve and must have public support for the pursuit of their education. This can be extended both through liberal scholarships supported by both the national and state governments, and through loans which will be written off in whole or in part in return for such public service work as teaching. The student who has to work on the side to pay his way through college is inevitably sacrificing some of his educational accomplishment, and this defeats the whole purpose of having him in college. Society is training in the colleges its future servants and benefactors; it owes them firm support, and they in turn ought to incur an honorable obligation of service.