Thursday, 21 November 2013

#1 How to Update Drupal 7 Modules and Drupal Core

This rough transcript is not by Peter Yoworski and will include a few mistakes

How to Update Drupal 7 Modules and Drupal Core - Advanced Ubercart series #1

Hullo and welcome to . I am Peter Yoworski, the Toronto website developer specialising in Drupal. This is the first video tutorial in our second video tutorial series on creating an ecommerce site using Drupal & Ubercart. This video tutorial like the first is brought to you in collaboration between myself and the team. We thought that it would be great to continue our learning and take a look at some advanced topics covering Drupal & Ubercart.

In this video series we are going to take a look at updating our ecommerce site, which we forgot to do in the previous video tutorial series, so that is why we will be covering it today, and we will also look at things like the Feeds Module, which allows you to import massses of products into your actual site, to get your site up and running in no time. Then we will take a look at advanced theming concepts. We will be covering things like the ?Less Framework, doing a bit of CSS, talking about how to do your own theme. I know we started talking about that in the first video tutorial series[0'55"] but we didn't get into the chunky vegetables of theming, so we'll be looking at that in this video tutorial series.

We'll also be looking at some - you know: some "use case scenareos" for Ubercart. So, briefly, we've dealt with file downloads and such but hwe haven't got into the chunky vegetables of what you can do with Ubercart. So maybe we'll take a look at a event registration site, im, maybe a question and answer site, that kind of thing.
We'' be covering those types of topics and some topics that people have posted on the video tutorials, wanting to see some discussion around certain concepts. If there is anything you would like to see out of this video tutorial series, please comment now; put it online, because in the next few months we will be shaping-up how the final finishing touches will look. So if there is anything you want to see please let me know so that I can incorporate it. [1'41]
That said, we are going to go ahead and we are going to update our site. That is something we should have done in the first video tutorial series when we went live, but unfortunately I forgot to show it to you, so I want to make sure that right away. What this allows you to do is ensure that your site is secure and that you have the most recent security patches for all your modules, as well as Drupal core. [2'00"]
In recording these video tutorials, usually I like to walk-through [the process myself] and then record them [the videos] to ensure that I don't stutter or screwing things up. Not that I don't stutter to begin with in these video tutorials. But in doing that I actually forgot to back-up the entire site so when I updated and walked through the whole thing, I actually updated the site we were going to update together. [2' 25"] My Ubercart Tutorial Series [site] is now up to date and has got probabaly the most recent version of Drupal Core, so we can't actually update this site. [2'28"]
What we are going to do is update my local development site that I use for my other video tutorials: TWD box 7. It is going to be the exact same concept, but it is going to be on a local server rather than our FTP server. I will flag for you what that means when we are actually doing things, but beyond that , it is not going to be much of a difference. [2'46"]
The first thing we want to do when we update our site is that we want to go ahead and put our site into maintenance mode. The reason why we do this is because we want no change in the database; we do not want anything happening when we are working on our site: [3'00"] make sure that we are not going to screw anything up. The way that we do that is that we go to
>configuration >development >maintenance mode
Now: when you get here, you are going to go ahead and check this little box that says
Put site into maintenance mode
You are able to customise your own message [to viewers of the closed site]. I am going to leave this [default message] which Drupal Core provides me. You can put whatever you want. You know: "thanks for your patience - back in five minutes"; whatever you want to say. So you go ahead and
Now, if I open a new browser, and I go to [my site on] localhost/twdbox7/ , we get a
TWD D7 Sandbox
Site Under Minenance
TWD D7 Sandbox is currently under maintenance. We should be back shortly. Thank you for your patience.
That's what was typed in; that's what users will see. Unless they have permission to administer the site, which I hope they do not. So that's that. We are now into maintenance [mode]. And now we should back-up the site. [3'43"]
The manual way that we do this, if you remember from the first video tutorial series, is....
I realise now that I probably do not have the module set-up. Oh - no, I do. That's great.
In the first video tutorial series we downloaded Backup and Migrate . We are now ready to go ahead and actually use that module. [4'00"]
System >backup and migrate
We are going to manually backup our database using default settings
So I am going to go ahead and back-up now, and you will see that it comes-up as an actual file that I can save to my desktop. Good. Now I have a backup of my database in case I really screw everything up.
While we are here, as a sidebar, we should have set-up schedules when we set-up the site, to make sure that we always have our site incrementally backing-up. You just go ahead and hit +add schedule here. You've just got to make sure that our private file system is set up. It is pretty straightforward. You can walk through this type of thing: you choose a schedule name, default settings (just leave it as default; you don't need it to do anything crazy). Buckup every - I would say every
unless you have a super-active site. Otherwise it would be kind of wierd.

The destination: obviously I don't have my destination listed here because I don't have my file system ready. When you have done that, you will have a destination available to you. That is the way to go about doing that.
So, we are going to go about doing a backup. [5'00"] The other thing that we want to do, if we are going to backup files on our site, and in case we screw-up.... Actually when I was preparing for this video tutorial series I and this video I actually really did screw up the site. So when you are preparing to update your site you should go ahead and backup all your files. Everything. Open up your FTP server, or client, rather. Download your entire site: all your Drupal installations. By that, I mean: I shall walk you through what ours actually look like. [5'25"]
So here is my site - TWDbox7 - so just copy everything in there, download it, in case you scew-up and you need to get the site back up right away. That's it. We are now ready to go. [5'40"]
You will see that we are getting these messages about security updates.
When we set-up our site in the first video tutorial series, when we were choosing which modules to enable, we anabled the Update Manager. What that update manager does is that it keeps track of when you have to update your modules in your site. [5'57"] But it can can secure the install and update web interface so that you can do a one click download and install of everything. I am going to show you how to do that. It is actually pretty easy. You just go to >modules>update and here are all your modules that we need to update. This list is obviously going to be a little bit different for you, and I apologise for doing this to the site without you guys, but you just go ahead and click "all" [top of the list next to NAME] of the files here, and you are going to download these updates.
You will see here that
Muanual updates required
Updates of Drupal Core are not supported at this time
Drupal Core (security update)
This is because Drupal Update Manager cannot actually do Drupal Core by itself. And so we will manually walk through how to do that. Meanwhile we will go ahead and click
, and you can see that Javascript bar going across [the screen] to show the progress. I am not going to make you painfully wait through all that, so I will see you when this is done.
So: there we go. Now we are done. And you will see here that we have got this
Perform updates in site maintenance mode (strongly recommended)
We are obviously still in maintenance mode, so that is good. What this [continue button] will do is actually update the modules for us now. It does not update php which is another thing that we will have to do. So we will go ahead and click
Now we are back here with a bar going across the screen showing progress while we update the site. I'll just skip past this so you don't have to sit through the wait for it.
So there we go. So we have updated everything - well we have not updated everything, but we have updated [7'15"] all of our modules. We see that they are all installed successfully.
Next steps
  • Your modules have been downloded and updated
  • Run database upates
The next thing that we are going to do is run database updates. We will go ahead and we will click that. So now we are here on the / file [page]. We hit

The version of Drupal you are ubpdating from has been automatically detected.
3 Pending Updates
admin_menu module

advanced_forum module
devel module
What it means is that these modules are going to make changes to the database, depending on what they have already installed in the database, so we will go ahead and hit

Then, again, you are going to get the status bar confirming the updates. It's usually pretty quick. Usually you get a summery of what has changed here, but obviously we're not actually getting that, so things should not be too bad. We've got no failures, so we are good to go. [7' 54"]

That's updating the modules. I didn't mention that I was taking for granted that you were doing this as the super-user. That is, user 1 from your site, with access to everything. If you are not, and you can't find - you know, you have enabled the update manager and you can't find it, or you can't find the backup and migrate, it is going to be a permissions issue. So you want to go back and make sure that the role that you are using has permission to do everything that we just did. You would do that by going to
people >permissions >roles here and having a walk-through to check that everything is as it should be.

So, as I mentioned, we updated the modules but we have not updated drupal core. I'll show you how to do that because it has to be done manually. And after that I am going to show you an alternative to all of this that will really streamline your life and make things a lot easier, and that is to use Drush, which stands for the DRUpal SHell. What it is I guess is actuall command line scripting, or a series of scripts that you can use to make things a lot easier. It's maintained on and it's listed there a project, but it's not an actual project module that you install. I guess it is something that you install to your server and then use to manipulate, you know, common functionalities [9'00"] or common tasks that you will be using on your Drupal site to make things a lot easier. Updating is one. Backup is another. It's really cool because a lot of modules will hook into it and you can do some pretty neat stuff. So I will walk you through that afterwoulds. [9'15"] But now I am going to show you...

how to manually update Drupal Core.

As I mentioned, we doing this all locally; you are going to have to pretend that we are doing it by FTP.[9'22"]
Here I am going to go through all this and copy everything except my /sites/ folder - so I have selected everything [by cut-and-paste] . What I am going to do is go a bit crazy, and I am going to delete everything
Delete multiple items
are you sure you want to permenantly delete these 27 items?
I'll click Yes because we are in the right place here, and delete all of this. What this actually does is it removes all of Drupal Core. The reason why we do that is that when we update, we are going to replace all the core files, and we want to make sure that we do not screw anything up; we want to make sure that there are no conflicts when we put in the new files for the new version. [deleting finishes]
So that's all gone.
The reason why we did not do the /sites/ folder is because, as I mentioned previously, we never hack Drupal Core. Don't touch any of the core folders. [10'00"] The only thing you should be touching is your /sites/ folder. That's were your set-up to the database, and you files should all be. Everything you set-up should be in your /sites/ folder, and you should never go into your core /modules/ folder or your core /themes/ folder to do anything. That is why, in the previous video tutorial series, when we were playing around with a theme, we copied that theme into /sites/all/themes/ and then played with it a little bit there. And the reason for that is that when you hit "update", you are going to over-ride anything that you do.
So I am going to go to a [new set-up of] Drupal 7.21 which is the most recent version at the time of this recording and I am going to copy everything except the /sites/ folder, because we already have that. I am going to put everything into my [directory which is] TWD7 sandbox.

So once I do that, I am going to go back to my site and we are just going to re-load it, and I hope that I did not seriously screw anything up like I did when I was first rehearsing this video tutorial series.
We can see the site. It comes-up. It's still got a home. My tabs are OK; everything looks good. [11'00"] So the files are good but the one thing we have not done is updated the database. So we go to [headed "Drupal Database Update" with a drupal logo] and hit . [A screen with a box headed "pending updates" is shown.] You will see that we have got pending updates. So we know what Drupal is going to update in the database. Specifically system nodule and forum module. They are going to be updated. So we go ahead and hit
Updates were attempted. If you see no failures below you may proceed happily back to your site. Otherwise, you may need to update your database manually. All errors have been logged.
  • Front Page
  • Administration pages
Great. So with that updated we can go back to our front page. Now we have updated our modules, and we have updated Drupal Core, so the site is fully up-to-date. We can confirm that by going to >reports >available updates
.We see no available ... at least that it has found but that is because we have not checked manually
check manually
obviously it's going to initialise, .... I am going to skip this for you guys. So I will see you back later. Done. We should have all new check results. So we are all good. [everything shows with a green background].

One thing that's not listed here is an actual theme because I am not using a custom, or rather a contributed theme. I am using Bartik. I don't see anything about my theme being out of date. You might. Before you go ahead and update [12'00"] I would check to see what the actual updates pertain to because if you have modified that theme, which is more than likely, you don't want to just go ahead and just update it because you will loose all of your modifications.

So that's it. The last thing that we have to do is take our site out of maintenance mode. So we put it back to go online and we just do that by un-checking the
Put site into maintenance mode
Before we conclude, I am going to show you two things.

This video tutorial assumed that your web site was not your hard disc and that is where you were doing all your maintenance. If for whatever reason you couln't, the way to manually would be that you would go to your site, so you would FTP in, in the command shell, or whatever way you are going to log-in. Either way, you would go to /sites/all/modules/ . Let's say I was updating the admin module. The admin menu. We would go ahead and we would delete that [file]. That's assuming you have not hacked this up. Which is something you should never do because you do not get the benefits of the Drupal Community [in helping to spot faults] on that.
Then I would go to - I've downloaded the module from, gone to the project page where I can download the module, [13'00"] downloaded the most recent versiuon, extracted it, and all I would do is upload if to my site. So, if I go back here, the admin module now has the most recent code. The next thing I would do (and I would obviously still be in maintenance mode) is that I would go to / [with an ordinary browser], and run through the updates on that.
If you want to do that for each of your modules the way to do it is obviously to go to the page for each of your
modules, download them, upload them, and them obviously run


Now, I promised that I would show you something about Drush. [13'25"] So, what Drush is, as I mentioned, is a series of scripts that you can use for common tasks on your site. So if you feel a little bit uncomfortable with this, this could be the end of the video tutorial for you. [13'42] But if you want to see some cool things about how to take your site to the next level, or rather your adminstration of your site to the next level, work with me here.
We are going to go to - download that. Get that installed on your web server. I'm sorry that I can't help you with all the questions about that: some of it is super-technical and way beyond my skill set. But the Drush team is awesome and I am almost positive that if you run into any issue, someone else has run into it, and there will be an answer on for you to help fix that. I ran into that trying to install Drush on Windows, and the Drush team have an aweseome Drush installer for Windows now. I've installed that. That's why I am in this Drush command prompt. So I am actually getting into my [WAMP] server, and I am into the TWDbox7 site [which is the site on the hard disc]. Now if I type stutus, Drush knows what site I am looking at and gives me all the information about it. [ you would need to look at this video at large scale to see what is on the Drush prompt ]

As I mentioned before, we had to backup our site and we had to update Drupal. We can do that in only two steps with Drush. All of these commands [on the Drush screen] - all of this stuff that happened here - this is all the Drush commands that are available in Drush, because of either Drush providing it, or other modules hooking into it. If you remember, we used backup and migrate module, and that actually hooks into Drush as well. So if we look at these, we have all the commands for backup and migrate. I can see that I have got to backup the site's database with the module right away. [15'00"]
II can just go XXXX , hit OK, and I am getting a bunch of errors because it's not actually set-up for my file system here, but Drush, typically, if I had done this on a liver server, would in two seconds have created a file, downloaded it, boom!: on the site. I can go and FTP in and grab that if I want to.
Then I can go DRUSH UP and what Drush is going to do right now is that it is going to go through all my modules, and trough drupal core, see if anything needs updating. So let's go ahead and do that. It would update my database at the same time. Because we have already walked-through [a more manual update] and did everything, it is not going to have anything to do, but Drush would have gone ahead, downloaded all of the modules, installed all the modules, it would have run that through /, and it would have gone through all of the stages that we manually, and it would have taken them off my back and done automatically with one simple script. So that is pretty cool. [15'52]
That's just scratching the surface. Here [on the list of commands] are other things that Drush will do. You will see that Views provides some commands, Voting API provides some commands. [16'00"] You can also write your own scripts. If you do a quick search [for scripts you can find ones] to disable all of your modules that are non-core; you can enable all of your modules that are non core, you know, if you are doing a site migration or that kind of thing. So it is really cool. Among other things that you can do I definately recommend that you go and take a look at Drush. [16'19]

That's the end of this video tutorial. Just to recap,
  • The first thing to do when you are updating your site: put it into maintenance mode
  • The second thing to: backup the database
  • Then you are going to go ahead and do your modules,
  • Drupal core, and run update.php for both of those
  • Make sure that there aren't any problems
Take that maintenance mode back off, to allow users back onto your site, and you should be good to go.

So that's it for this video tutorial. Hopefully you learned something. Hopefully this was helpful. We'll see you again in the next video tutorial where we will be talking about mass importation using the feeds module, and possibly UC_feeds. As always, if this helps, give me a thumbs-up. Its always good to see people appreciating. See you in the next video tutorial.

Monday, 18 November 2013

Drupal 7 / Ubercart Video Tutorial 6 of 10: Configuring Shipping, Paypal and Taxes

[Drupal 7 / Ubercart video tutorial 6 of 10 showing how to set UPS, Paypal, and conditional taxes]
[Drupal 7 / Ubercart video tutorial 7 of 10 showed how to use the default catalog module]
[Drupal 7 / Ubercart video tutorial 8 of 10 showed an alternative flexible method of showing a catalog]
[Drupal 7 / Ubercart video tutorial 9 of 10 shows how to use product kits, stock, and order states]
[Drupal 7 / Ubercart video tutorial 10 of 10 shows a simple checkout, reports, and suggests a theme]
Hullo and welcome to the 6th video tutorial in this ten part video tutorial series. I am Peter Yaworski the Toronto website developer specialising in Drupal and Ubercart. Like other video tutorials in this series, this is a collaboration between myself and the help pages.
So let's get into it. I'm going to assume that you have watched the other video tutorials in the series and that you are ready to set up payments and shipping as well as taxes. In order to do so we are going to go into...

Ubercart basic UPS and flat rate shipping

>store >configuration >store address
Make sure this is entered in if you are using UPS shipping quotes. If it is not, you will get an error; this is actually sent to UPS. Make sure this is actually set to UPS. With a lot of clients that I have dealt with have screwed this up. One time I screwed-up, actually: I want to record this. I kept on getting error messages until I realised that it was because of entering this store address that there were problems. Once we have done that we can go into - I'll start with shipping quotes.So let's go into our settings for shipping quotes

>store >configuration >shipping quotes > settings

Two things I want to show you right here
Log errors dyuring checkong to watchdog
Display debug information to administrators
Prevent the customer from completing an order if the shipping quote is not selected

Displaying debug information to administrators is hugely helpful. If you are having trouble setting up UPS and you go to forums, people might ask for this debug information to figure out what is going wrong. When you post that, be sure to wipe out your username and password from that information: you don't want to share that.

Secondly, default pickup information. This is where the pickup will take place from UPS. You will see we have our shop information at 1 Main Street Hollywood California; it should match your store information, assuming that the pickup is in the same place. Again, this information is sent-out to UPS and you want to make sure that this is filled out correctly, or it will cause errors. But, that said, there


You will have to contact UPS, and set-up your own account. They will send you a personal access key, a telephone number, a shipper ID, as well as a password. The great guys over at XXXX allowed us to borrow theirs for the making of this video tutorial series. You will see that at present we are in testing server mode. Later on when we go into production, we will make the connection live but right now we are using it in testing mode.

Service options

This again depends upon your agreement with UPS. We only want UPS ground to be available, but this will be where you choose what other services ... be sure to know what services you have set-up for your account and so what services are available to you.

Quote Options

Each product in its own package or all products in one package. I'm just drawing your attention to that. The other information there is all dependant on your agreement with UPS, with the exception of
System of measurement

Oh: sorry - not with the exception of system of measurement, but I am just drawing your attention to the fact that if this is wrong you will get errors. You have two options here - British and Metric, depending on your agreement with UPS. [2'45"]


Rate markup type

The last thing I wanto draw your attention to. If you want to mark-up your shipping costs, for various reasons, you have these uptions here. You can do that as a percentage, a multiplier, or additional dollars. So we could add $2 to every quote that we recieve from UPS.

Label printing

Then label printing. You can go ahead and set that up

You will want to go ahead and save that configuration. (I don't need to because I've already got the information there.)

But, before we move on, we will also add a flat rate quote

Shipping method title*

the rate shown to admnistrators to distinguish this method from other methods 

Line item label*

The name shown to the customer when they choose a shipping method at checkout 

Base price*
The starting price for shipping costs

Default product shipping rate*
Additional shipping costs per product in cart


We can go ahead and add a condition here. If you only want to sell within Ontario or you only want to offer a flat rate within Ontario, you can add a condition.
+Add condition +Add or +Add and
You will see conditions [set-up] when we go and look at tax, so I don't want to set one up here, but it it possible to do that, so that is always good. Then we are going to go back to Shipping Quotes, and add a weight quote [03'57"]

Weight Quote

Shipping method title*

the rate shown to admnistrators to distinguish this method from other methods
Line item label*

The name shown to the customer when they choose a shipping method at checkout
Base price*
The starting price for shipping costs

Default cost adjustment per pound weight (lb)*
The amount per weight unit to add to the shipping cost for an item

We'll go ahead and save that.
+Add condition +Add or +Add and
Again, there can be conditions if you want to do them. And I believe that's all for our shipping quotes. [4'19"]

Payment methods set-up in Ubercart

>store >configuration >payment methods

Now we are going to to into our payment methods.
You should have two payment methods if you have followed-through the other video tutorials in the series,
Paypal Express Checkout
Paypal Website Payments Standard

If you don't have these, check your
>modules and make sure that the Paypal modules is checked-off.

Express Checkout is simply one button that will take your user over to Paypal to directly type-in their credit card information. Website Payments Standard progresses your order through Ubercart and then sends all the information to Paypal at the end when you checkout.
In order to use the Express Checkout you have to have a business account with Paypal, so you want to go ahead and do that.
Currency Code

This is what the currency is being sent to Paypal. Interestingly, you can get additional modules now that make this [choice] per order, so that if customers are in the US they can pay in US dollars; in Canada they can pay in Canada dollars. I've just set-up a custom module for a client who wanted to do that so that his customers did not have to change currency.
API Server

Setting that up for the sandbox is what I am going to be doing - so https://developer/ . I suggest that you do this to test things out. I am obviously logged-in [to the site] but if you are not logged-in, there is a simple sign-up button and you just do that.
API Credentials
API Username

API Passwword


You need your API credentials so I supply the API that I got from the sandbox. I got them right here from
Sandbox >API and Payment Card Credentials [a menu choice on] Right?
Sandbox >Test Accounts
The other cool thing that they do is that they create test accounts, so I have "Test Business" and "Test Personal", so I can

you would actually get these by logging into your business account with a profile. You click "my selling tools > API access" an [6'00]
This is kind of important:
Default PayPal landing page
Create card submission form
Account login form
...because when you are using Paypal Express Checkout you don't want to make people have to open a [Paypal] account; you just want them to get their credit card information, enter that information, and get off [the paypal site] as soon as quickly. as soon as possible. Because e-commerce studies are showing that the longer you make the payment process the more likely people are to abandon their cart. So make this as seamless as possible.
You also have to go over your settings in your Paypal Business account and make sure that it directs a user to a credit card information page and not to a login page. That is key because, you know, you don't want people to have to create a paypal account if they don't want to. So this is our ???? for express checkout.
Checkout Standard
This is a little bit easier. All you need is your paypal address that the money is going to be paid to, your currency code,.... I am using the default Paypal language which is US, and the sandbox. This is what we are giong to be doing. I should be using my sandbox email address. [7'00"] This one here. So cut and paste it into the page.
Then obviously you want an itemised order
Paypal cart submission method
-submit the whole order as a single line item
submit an itemised order showing each product and description
And then we can...

This debug information. Again, it is a big time-saver.

A conditional tax rule setup in Ubercart

.>store >settings >taxes

The last thing we are going to do is checkout the taxes. So when we were setting up we set a tax rate for Ontario. So that's that. Let me show you a key thing here.
include product tax when displaying prices
You will see when you set-up a product that there is the sell price and the display price. This display price will include taxes. You will want to have this checked to "off" if your taxes are conditional or for a specific area - lets say only for Ontario. Because everyone will see the price including tax, they won't know what's going on. You don't want that to happen. So I just wanted to draw your attention to that.
We are going to add a condition
+Add condition +Add or +Add and we don't charge Ontario tax.
Select the condition to add

You will see here that we have [example conditions on the drop down menu for] orders, but order conditions to not include the provence or state. We have "order state", but this specifically refers to - you know: is it in process? is it completed? is it in checkout? That's the order state. Not the geographical region. So in order to do that you have to go to data comparison
Now our data selector is the "order..." - ".." stands for additional information. Look for "billing address", and then "zone". This zone is the actual state, provence, or zone. That's what we are going to see when we hover over it. So we choose that.
And because we are choosing this data comparison, it is going to give us these pre-populated values that are available per Ubercart. So: there is our "Ontario".
And now the taxes only apply to Ontario orders, and we are good to go.
>content >add content >add product
Why don't we add some products? Or a product.
Name: Pete's awesome product
Descritpion: Test product description (you don't need that but:: whatever)
Image: Add a new file
We'll add Bailey like we always do.
We have not set-up the catalog because that is going to be in the next video tutorial series, but we obviously need

Sell price*

Now: weight. If you are using UPS weight quotes, you will have to add a weight.

You also have dimensions, right? Those are going to be your appropriate dimensions. Maximum package quantity: how many in a package can there be? So we are going to add up to 50 Baileys to our package.
shipping settings

Then shipping settings

Again, this is from UPS and depends upon what [options] you have from UPS. I have a "customer supplied package" [which is one of their options]
Default product shipping type It's going to be the store default, so we will set that as the store default. Default product pickup address.
If you are having issues with UPS, getting shipping quotes, and then you realise that you did not have your store set up properly, would have to come back in here and set-up your default shipping address for your product. It does not get updated automatically when you change that store address, so if you have changed your store address and everything is set-up properly for UBercart but you can't work out why you keep-on getting errors from UPS shipping qutoes, it could be because your product is possibly not set-up properly. So check that out if you are having issues.
Shipping weights we can obviously customise if we are using flat or weight quotes
XML site maps does not set-up correctly until we have all that included.
Publishing: I am going to put it to publish it to the front page to see what I've got available for ordering.

Now: this is actually a huge picture. What I did not show you is that I actually went into
>structure >content types >products >manage display
This by default is just "image", so we can see the product ....
....and just save it.
As I showed you before, there is the list price, the cost, and the sale price, and the display price. Four prices. We actually don't want the cost [price], so that is [set to] hidden, we don't want the sale price: no. We want the sell price but we do not want the list price. We will be covering this in another video tutorial so bear with me. We will go ahead and we will save that.
And then just briefly: the teaser [abbreviated display to show with others: one of two buttons top right of the screen]
We are going to get display price and sale price [as options]. So you are going to get two of those and you can remove whichever one you want to. And you have the descriptions, so that's fine.
Let's go to the home page now: here is one our product. Like I said, display price is what this is; sell price is what this is. [on the teaser]. Go ahead and look at that. Here we have the display price, the sell price, the dimensions, and the add to cart button. [tests it] And we can [use paypal's] express checkout. And then this is what it [the paypal order form] looks like for you; you are right into it. You will see that it is trying to get you to set-up a paypal account. This is where those settings go right through with the payment screen; you do that on your own Paypal account as well as on Ubercart.
This is the standard Paypal checkout. We choose "checkout". Obviously I can fill in my information here.
These are our three shipping options, so obviously UPS is providing us with the quotes.
This one is $17.52
There is the flat rate
There is also the weight quote.
Obviously you would not provide all these to everybody who orders; you would just provide them with one quote. For testing purposes we are going to use UPS ground in order to complete our order.
review order screen : you will see here that we are not getting charged any tax becausee we are not in Ontario. lets go and try that out. [changes address to one in Ontario]
Obviously UPS is going to return an error because we have a Canadian postal code. You could use debug information to check that out. Shipping is $15. We review our order. And there is our Ontario tax - HST - because we are in Ontario and pay 1.95%.
We are going to submit our order, and it looks alright in our sandbox. You will see here that we have the default currency - that's $USD - and I could use my sand box information to change that.
So that's it - that's setting-up payments through Paypal, setting-up UPS flat rate and weight quotes for shipping, and setting-up conditional taxes.

I hope this helped-out. The next video tutorial will most likely be coming in a week or two. As always, leave comments: I love to see the likes and dislikes on Youtube . As always, if you need additional help:, or We'll see you in the next video tutorial

[Drupal 7 / Ubercart video tutorial 6 of 10 showing how to set UPS, Paypal, and conditional taxes]
[Drupal 7 / Ubercart video tutorial 7 of 10 showed how to use the default catalog module]
[Drupal 7 / Ubercart video tutorial 8 of 10 showed an alternative flexible method of showing a catalog]
[Drupal 7 / Ubercart video tutorial 9 of 10 shows how to use product kits, stock, and order states]
[Drupal 7 / Ubercart video tutorial 10 of 10 shows a simple checkout, reports, and suggests a theme]

About transcription: 

I'm not connected with Ubercart or Peter Yaworski. I transcribed this from the Youtube video.

One method is to use my favourite wisywig html editor squeezed onto the same screen as the you tube video. Play abour half a sentence at a time. Where the text and the form-filling on screen are the same thing, use the Wisywig's dashboard to add these components - - as you go. Blogger's html editor - the default "compose" screen - doesn't have nearly enough of them. I hadn't heard of fieldset before and now feel more clever, but my old html editor has not got a button for it so I've often left it out. Horizontal rules are just <hr> and easy to put-in by hand. Headings and typefaces are easy to put-in in Blogger.

Youtube does have automatic captions on it from a voice recognition system, but they don't work on this particular accent. I don't know if an author can add captions; if so I'm happy for these to be glued-in.

When the first useful draft is done, show it on screen as raw HTML, and cut/paste to the raw HTML editor of your blog. Don't be put-off by the hideously complex html that it is converted to; it needn't be so complicated. That's what worked for me on, which is free and allows adverts like Qadabra or Adsense or whatever. only allows their own adverts, which I don't know anything about. I wouldn't go spending money on a domain name because the ad revenue was only a cent or so a day and then ceased altogether from Qadabra, so it isn't really a living even without buying a domain. The main motive for doing this is so that nobody else has to repeat the same work, if their concentration isn't great or english is a second language and they need the nitty-gritty text. Oh and I get lots of pages on which to mention a shop selling vegan shoes from the UK.

Friday, 15 November 2013

Drupal 7 / Ubercart Video Tutorial 10 of 10: Launcing your sitem Ubercart Reports, Drupal Themes and Add-on Modules

Hullo and welcome to the tenth video tutorial in this ten part video tutorial series about creating ecommerce sites using Drupal and Ubercart. I am Peter Yaworski, the Toronto website developer specialising in Drupal. Like all the video tutorials in this series, this is brought to you as a collaboration between myself and the team who thought it would be a great idea to have a video tutorial series out there to help people get their ecommerce sites off the ground. [00'21"]

So, just before we finish-up, we are obviously going to covering going-live. We are going to be looking at some reports. And then we will check-out taking your site to the next level.

Next series: cron developer tools, a theme, ssl connections, mass product import, and views.

Just recently, Ubercart and I started having some conversations, and we have decided to move forward with the second video tutorial series, in which we are probably going to look at things like theming - theming your site - so we will look at less css [style sheets]; we'll probably look at some cron developer tools, we will probably walk through a theme that we are going to show you here, which was specifically developed for Ubercart. Then we will also be stepping into the world of ssl, so how to secure your site if you going beyond [the option of] Paypal. We will be looking at modules like feeder modules to import masses of products: if you have a few thousand products you obviously don't want to create those one at a time. The feeds module will help you out with that, so we will probably have a dedicated video on that. We will also be looking at some advance Views - how to use the Views module. Obviously, being the most downloaded module, that is something pretty important.

Oopps! I forgot to show you how to update your site in this tutorial (ie Drupal core and modules). This will definitely be the first topic in series 2.

This Ubcart video tutorial series

  1. So that will be coming out, hopefully pretty soon. I look forward to it. But, until then, this is just a brief re-cap on this series. In video one we first configured our server, created the database for drupal, created a database user, uploaded our site and got Drupal installed. Wham, bam, thank you ma'm.
  2. In the second video tutorial we talked about stepping back from our site to talk about some common Drupal terminologies including blocks, themes, modules, nodes: just things that you are going to need to know when you are in the Drupal world.
  3. In the third video tutorial we started looking at some module functionality. Such as looking ad, looking at what you need to know. Downloading those modules and getting them up onto our site.
  4. In the fourth video tutorial we started configuring those modules. That was everything but Ubercart [which is a module]. Specifically we looked at a lot of search engine optimisation, so, if you have not watched that video tutorial, go back and look at it because you want Google to drive traffic to you.
  5. In the fifth video tutorial we started looking at Ubercart itself, and configuring some minor changes. I don't know - store name, your store email address, that kind of thing.
  6. Then we stepped into the real vegetables of everything in video tutorial six, where we started looking at configuring shipping quotes, flat rates, paypal, taxes.
  7. And then we took that  a step further in video tutorial seven, where we began configuring products. We have shippable products, purchased roles, downloadable products, and we looked at the catalog that starts, or rather comes with Drupal.
  8. In tutorial 8 we took a sidestep and we started to look at the world of Views. We looked at taxonomy term pages with the Views modules and then started looking at [the question] "how do we do that for our catalogue?". And obviously Views is pretty powerfull; it is the number one module downloaded. So there is a lot of power there, and that is actually something that is being incorporated into Drupal 8 which is pretty exciting. So, with the next major release of Drupal, you are going to have Views in there [the core code]. So: a good thing to know how to use.
  9. In the previous video tutorial - video tutorial 9 - we looked at product kits, store stocks, order states. Just getting a little bit more of a fine-grained control over our website before we launched. So that takes us to video tutorial number ten we are actually launching. So that is pretty exicting. [03'11"]

    Transcribed videos: -
    [Drupal 7 / Ubercart video tutorial 6 of 10 showing how to set UPS, Paypal, and conditional taxes]
    [Drupal 7 / Ubercart video tutorial 7 of 10 showed how to use the default catalog module]
    [Drupal 7 / Ubercart video tutorial 8 of 10 showed an alternative flexible method of showing a catalog]
    [Drupal 7 / Ubercart video tutorial 9 of 10 shows how to use product kits, stock, and order states]
    [Drupal 7 / Ubercart video tutorial 10 of 10 shows a simple checkout, reports, and suggests a theme]

Simplest payment method: a remote-hosted checkout such as Paypal Payment Express

>store >configuration >checkout

So, to jump right into that, the major things we are going to have a look at are payment methods.
So we will go over to >configuration and we will have a look at the payment methods that we have setup right now. So  right now we have Paypal Payments standard. This is the actual checkout where a customer is providing information on your site. Now, if you do not have ssl set-up, it might not be a good idea to do this, because you are actually taking personalised information on an unsecured page.  So what I prefer to do when I am doing paypal and I do not have an ssl installed is just to have Paypal express checkout.

The way that you do that is to go to
>store >configuration >checkout
Here we have enabled checkout. [checkbox: Enable checkout. Disable this to use only third party checkout servicesn, such as PayPal Exress Checkout of Google Checkout} So if we disable this, we can only use third parties like the Paypal Express Checkout. So, I tend to do that. [[save configuration]

It is a personal preference, however there are some concerns about collecting personal information on an unsecured page. It is entirely up to you: this provides the option to do that.[4'45"]

So now if we step back, over to our >payment methods, we can go and - we may as well uncheck that cand [save configuration] - and now we can go to the
[link in a line of text "settings"
settings for paypal express checkout.  Now, if you remember, we were using the sandbox. So we want to change that [dropdown menu, live or sandbox] to live. At the same time we want to make sure that our paypal email address is updated. [5'00"] So: I am at torontowebsitedeveloper dot com. And then my API credentials [from a box of three text boxes ] these are all on my test site. So, what you are going to do is to log in to your live account. It is going to look something like this. It will be in "my account" [tab]. And you awnt to go to "profile. Then when you are in profile you want to go to "my selling tools". Here you are going to have API access, so you are going to hit "updtate". This will typically say, you know, we need to verify your account, so once you have verified that, you are going to come here and you are going to request API credentials  , and then it will actually provdie you with your API information. Then you will take this, and you will copy it back to your site. So once you do that you are going to have [5'53] live server, you are going to have your [api] username, password, and signature. Here you are going to use the credit card submission form.  This ensures that when users are checking-out, they don't have to have a paypal account, and then these [check] boxes here ...
...these are what is going to show up after the user provides their payment. So they will be brought to your site. back to your site and you will see these boxes.

we do have shipping options, so we want to be able to allow the user to check that
we don't want them necessarilly to have a company name, because not everyone is going to be associated with a company
we do want a contact phone number
and we are going to allow them to enter some comment text
so we will go ahead and [save configuration button]

now I'm just going to put my [site] back to sandbox [dropdown option] because I am obviously not going to be doing all that.
And so we are good.

The next thing that we are going to check-out [consider] is our actual shipping quotes and making sure that our actuall UPS module is configured to "live". So we do that but - obviously - having our information here. that we got from UPS when we were setting-up our account.

We are actually going to put our server mode [drop down on this page] into "production". And then we would [button] save our configuration [7'00"] and that way our link-up with UPS is complete. We are essentially live on payments and shipping. So that's that. Once you do that, your site is live and ready to go.

Testing with a real $1 order

What I personally like to do, once I have done that, is actually test an order. So I do that using Chrome. I hit control+shift+N and this will bring-up an in private browsing screen. The reason why I do that is because I like to keep my logged-in site , in case I need to change something, but also to be able to have the anonymous user browsing experience. So here I will go back to , and now it doesn't recognise m e as being logged-in. So, once I do this, I will go ahead and I will [add to cart]

Sorry. Before I do this, I usually change the product [price] to $1. So I would come in here. I would go to super saver. Edit this product .... looking at the product kit there. Super awesome product. Edit this. [sell price]. And we will make this $1. You will just want to note what your original price is. [save] The reason why I do this is because  (ha- we need a product type. Of course] The reason why I do this is because I always like to walk through, actually ordering a product from an anonymous user point of view, to make sure that we don't have any errors. So I will actually go forward and pay paypal, complete the order, and do the full payment processing, to make sure that I understand the user experience, and that there are no hidden issues throughout that [experience] that I might not be aware of if I do not actually complete an order. Because it is only $1, paypal is going to take their 33 cents from me, but I am going to have that peace of mind that the site that I am building - either for myself or for a client - is working properly. So I am going to go ahead and [add to cart]. [9'06"] Obviously you want to do this before you actually launch the site or make it accessable to people because you don't wan them buying a product for one dollar. Or, do it in the middle of the night. So, here I am going to do this with a test site. I am going to walk you through, just so you can see what it looks like. But you would obviously be doing this on a live site. And checking out. [9'30"] Alright. So you go ahead and continue. And this is what I was referring to before when we configured that checkout-page. We have configured paypal so that they bring us back here. Here is our contact phone number that we are going to enter. [order comments] "great site, looking forward to recieving my products". [button: continue checkout] Finalise by submitting. [button: continue order] There we go. So we are going to return to the front page. Now, if I minimise this, [10'21"] I can go back, checkout [consider] my store orders, and I can see here that I have got a dollar; I can go into my actual order settings, checkout what is going on, and I can go and I can finalise the payment, and we are good to go.

So: that is walking you through the order. I highly recommend that you do that just to check that nothing is problematic. Obvously, now we would go through, finalise the transaction, notify the user, make sure that she knows that everything is working properly, but you can do all that [without a video].  So that's it. Once you do that, you are live. You are ready to go. Your site is online. So: in the afternoon that it took you to watch this entire video tutorial series , you went from nothing but having Drupal and Ubercart to having your ecommerce site online and that is the power of using ubercart and using Drupal, and leveraging the drupal community. [11'20]

Reports in Ubercart

>store >reports >customer reports

The last thing that I want to show you, just quickly, is - I lie: a couple of things I am going to show you.
The last thing about Drupal is reports >store >reports >customer profile [for example]
thiese are pretty nifty; pretty handy. You can actually checkout here. These are the different customers that have placed orders, right? So you can see that I have got one order showing zero because we have just created it and we have not actually finalised it. Zero products because not completed - right? I am not entirely sure why I am seeing my name twice here. Obviously the customer is different. But it is the same information. So if anyone has got any thoughts on that, leave a comment; let me know. I just could not spend the time trying to figure it out

Ubercart products report

In terms of some of the other - some of the other powerful reports that you have got: you have got your products report. This is nice when you really start selling on Ubercart. .  because you can see how your products are doing, what is the highest selling, as opposed to - you know - the worst selling. It also breaks it down by your specific SKUs, so, if you remember, we had Pete's CD Y: that was yellow. If we look down here we have [12'17"]
aanother CD so if we want to compare different colours, to see what is most effective, it is possible to do that. We also have the ability to customise these reports, so if I want to look at specific dates I can do that. If I want to look at a particular comment, or whether it is pending, or, you know, mayber there is something: people are abandionding the checkout because they have got to see - on certain products: you now - why is that?

Ubercart sales report

From there we have got the sales report. Obviously a very important report where you can actually checkout your dollars over the years, and where our orders status is at, so we can checkout how many are abondoned. So if we have an issue going on here, we can start looking at that process: why are people not understanding; why are they leaving? There has got to be something there. So we can really nail that down. Again, you have the opportunity there [13'00"] to customize these reports and look at things specific to what your needs are. Specific months. Specific years. And the order statuses, right? Probably not earth-shattering, but the last thing I am going to show you is the sales tax report. Remember we set up our tax report for Ontario HST [Ontario HS Tax] So you can see that if we look back here, I have got my total taxable amount and the total tax collected, mainly for when you are doing your income taxes. So those are pretty much the reports. Pretty straight forward. Nothing too earth shattering. Hopefully they help. I just wanted to touch on them because obviously they do come with ubercart and they are helpful, so you should know about them.

A theme for Ubercart

Last thing: we will just head over to Like I said, there is a couple of things that I want to show you here. Go over to Adaptive theme. We have been using Bartik [the name of a theme]. Drupal Core is kind of ugly to be honest with you. And if you look at it: you know you are looking at a Drupal site. Not necesarily something that you always want to have. So what I have gone ahead and got Adaptive Themes [14'03"] It is a kind of a base theme that you can use, and make sub themes off of it. A sub theme that has been created is called the AT commerce theme. If you want to go ahead and download this x.3.1 version, you can upload that to your site slash sites /all/themes , just as we did with our modules in our fist video tutorial or second or whatever it was [the admin user interface allows you to install these things without thinking about uploading and doanloading nowadays as well] You are going to get the Adaptive Theme, and you are going to get - er - AT-commerce , and you are going to download this one as well. So I have gone ahead and I have done that. So we will step over to our >appearance, and you will see that I have got AT Admin AT Commerce AT Core, AT Sub Theme - right? This all comes with the adaptive theme . So I am going to enable as default the AT Commerce [15'01"]

So now, if I go back to my home page, I have just drastically changed the look and feel of my Ubercart or my Drupal and Ubercart site, simply by enabling this new theme. I can click into my product here. I can see that it is theming different things. It has got a different look and feel. [Baily the dog looks very fetching] That is the power of Drupal. You can go on to... - just as you have got modules, you go to these themes, and you can checkout those themes that you like, and that have a different look and feel, and [going to a theme called Binelli ] here, - oh: not a good image - but this is the look and feel that I can install just by enabling a module. Then I can start tweaking it and playing with it. I just wanted to give you a flavour of that because this AT Commerce theme is specifically designed for Ubercart, and it has a lot of powerful things. I am not going to walk through it here, but we are going to be looking at it [or walking through it] in series two. Take a look at it. Maybe you want to play with it.

Responsive: works on a mobile

The one cool thing that I like is this responsive theme: so you can see that my image here [of a the dog Bailey] is shrinking. If I stretch this [browser frame] out, obviously it has gotten [german english] out to the large size, right? So that is pretty cool. That is a mobile friendly web site., that you have, just by installing a new theme.

Lastly, as I mentioned before, the power of Drupal is that there is this community that is (kind of) helping you out. You can go here and you can [16.36] I go to download and extend; I look at my module categories, and you will see that thre is an e-commerce category. If I click in to that - what is your first module that you see right there? Ubercart. Super-powerful! And then there are a lot of cool modules that I can add-on there. So if I wanted to add-on "recurring payments and subscriptions", I can do that by grabbing tha module [...] enabling it [17'00"] and then more often than not you will see that there is documentation and that is going to help you walk through and in eenabling some of these things. So that is one good one. If we go to the second page, I think there is  UC Variable Prices on there. You will see that UC Variable Price is good for donation sites. If you want a person to pay what they can, enable this module, and you are "off to the races", right?

Fedex has a shipping module too

You have also got FedEx Shipping . We have done UPS but if you have a Fedex account you can download this module and install that, right? [ in the UK: there is no Royal Mail support for such stuff and best prices depend on other couriers as well as Royal Mail. Royal Mail is best for export, but that depends on converting a customer's country to shopping cart that makes it obvious or default to say which of the four Royal Mail zones she lives in. No such module exists. One advantage of Ubercart here is that it does not have a lot of higly paid staff claiming that it works "out of the box", because neither Ubercart not Commerce is good for UK shipping; it is a question of finding the least bad for complex work-arounds, and a smug sales person saying that something works "right out of the box" just makes the problem more frustrating for users of Commerce.

And then lastly what we are going to the checking out [viewing] in the second [video tutorial series] is [module Ubercart SS. A super awsome module. Enable that and it will secure your pages. Obviously a huge Caveat here: it does not work with the overlay module. I am not too fond of the overlay module, but if you are, and you use it, you are going to have problems there. 

That's it! That is essentially the video tutorial series. I have kind of walked through everything; I have given you the recap on what this is all about, so hopefully this helps you. Hopefully your site is launched and is making you a little money. And we will see you [lie: it is a one way camera] in video tutorial series number two which should be coming up pretty quickly. Take care.

[Drupal 7 / Ubercart video tutorial 6 of 10 showing how to set UPS, Paypal, and conditional taxes]
[Drupal 7 / Ubercart video tutorial 7 of 10 showed how to use the default catalog module]
[Drupal 7 / Ubercart video tutorial 8 of 10 showed an alternative flexible method of showing a catalog]
[Drupal 7 / Ubercart video tutorial 9 of 10 shows how to use product kits, stock, and order states]
[Drupal 7 / Ubercart video tutorial 10 of 10 shows a simple checkout, reports, and suggests a theme]