Time to Put Your Business Card Online?

I have a lot of friends who run small business.  Some run very small businesses.  That means their web options can be limiting.  Yes, they could go all out and do some social media advertising (which is always a good suggestion) but I think a friend of mine nailed it on the head - he needs what amounts to be a "business card" that is posted online.

Initially I thought this was kind of absurd but after some time I am starting to think that he is on to something.  Social media is limited by the form fields big companies place on their sites.  As of yet, none have done a good job of tying information together across services like a custom site can.  But what happens when you are ready to step up to a custom website but you are not quite ready for a full-fledged multi-page CMS site?

The business case for a really small site

Some say that blogging is the answer but a lot of people who work on their own are not keen to be writing all day or even once a week.  A business card is all these clients need... a simple design project and some plain text somewhere on the page so they can start getting into Google's index.  Something that will still be there if they forget to post for six months.  With a setup like that a business can start defining it's own image rather than leave it entirely up to online commentators. 

The added advantage of doing things this way is that the account is not terminated due to lack of activity.   It also ensures someone is seriously looking at your SEO and that you can track the results of your campaign(s).  That can be important for people that do not work online but see their presence as a distant cousin to their Yellow Pages ad.

Restaurants fall into this category for sure - how many eateries do you love but either do not have a website or have a really terrible one that you can never find? My favourite pizza delivery shop has no online presence at all, except for a few comments on a restaurant review site which happens to have the phone number listed there.  It would be great for them to have their name and a phone number somewhere consistent.  Even better if it had a menu.  That's really all I need to order a pizza... and a one page site would do the trick.

A "business card on the web" would help businesses like these - where they already have some online presence but they want to have some control over their identity.  It is a bit of web design, some programming and search engine optimization.  That can be beyond a lot of business owners but fairly trivial for those of us who love code. 



Migration to Debian 5, aka, Lenny

Todays post is a quick review of the upgrade process to get your existing Debian system up-to-date with version 5.  For those who are unfamiliar with Linux, Debian is a variation of the free computer operating system that is well suited for server usage.  It also happens to strip out most of the branding you would find in other Linux distributions which is one of the reasons I like it.

The Upgrade Process

Moving up to the new version of Debian was as simple as running the distribution update command:

apt-get install dist-upgrade

... except for the fact that my OS partition is now getting quite full.  So eventually it would stop, complain about disk space and ask me to resume later.  Apparently Lenny, the codename for Debian 5, requires more space.  Go figure.

apt-get clean

Ok, we've dumped all the installer files for these packages that have been installed.  Resume installation.  Everything goes pretty smoothly from here.

At the end I need to run Lilo and I really need a new Kernel (I had been shamefully running an ancient Kernel on this box - over a year old at least).  So I asked the system for a new kernel and got it. 

One blip: the video driver.  I have a strange Intel-based motherbord - the IntelD201GLY - which has an integrated SIS graphics card with little/no support anywhere to be found.  I had to compile the drivers myself... (against the new kernel of course) and now having done this process twice I will be more diligent about kernel updates because it really doesn't take that long to fix.

The User Experience

The difference in performance was profound.  The combination of a new kernel, a more modern browser (Firefox 3 - packaged as Iceweasel 3) and the vast array of other updates have made the first few minutes an amazingly refreshing adventure.  The few hours I spent debugging were well worth the effort.

The icons changed, themes changed, and in some cases syntax changed (which of course means fixing a variety of scripts).  Overall the system feels more integrated, nicer to look at and less invasive.  I can see myself getting very comfortable with this.

The Missing Link

The one change that did catch me really off guard is the disappearance of the original Xmms.  I had been using it for years as a secondary player and I apprecaited the support it had for changing output devices on the fly.  No other gui player seems to have that feature implemented as far as I have been able to tell.  Why not just use Xmms2 you ask?  As far as I am concerned Xmms2 is a nightmare.

With Xmms2 it seems the developers wanted to make a server-based player.  Fair enough, but I already use Moosic for this and it does a good job.  I wanted to drag and drop from Nautilus - no more.  Of all the gui interfaces to Xmms2 none of them seem to support drag and drop from external apps.  Further to this, Gxmms2 can't seem to load the queue with files from within it's own interface.  Abraca is the same.  Esperanza will load the files into the list but runs the KDE interface - the only app on my desktop that does.

The main issue I have with Xmms2 is the lack of support for changing devices in the gui apps.  I have to run commands to update text files.  Frustrating!  The volume controls do not seem to want to associate with the proper device no matter what I try and no features other than the bare minimum are documented.  What seems to have happened here is that Xmms2 became a radio streaming program and lost sight of why it was created in the first place.  I don't mean to be harsh - I'm sure I will like all those new features when I get to them... but in the meantime, how do I listen to tunes on my second audio card without a bunch of hassle?  Suggestions?

Last Word

Debian 5 is a nice update to a great OS.  There are small improvements everywhere and it makes my old desktop a lot more fun to use.  Hardware support seems to be gradually improving over time and this is a good thing.  I was thinking about jumping ship to Ubuntu a few months ago but it was worth the wait.  I use Debian on the desktop and the server so the consistency is a huge advantage to me.


The #1 Online Feature at Rogers Wireless

I am a Rogers Wireless customer and I have been for some time.  Until recently I have not had the need to use their online service to deal with my account details because calling 611 solves most issues I have come across.  Eventually convenience got the better of me so I signed up for the online administration service.

The Snails in the Mails

About a week after signing up for the online management interface I received a letter - by snail mail - to confirm that I have setup the account.  Though this seems strange, I suppose it would be nice to know if someone else had logged in without me knowing it.  Snail mail can be pretty reliable with that, and I hate when Rogers phones me so on that front I was pleased.

What was strange about the letter though was the list of features:

"Now with your online account, you can

  • Reset your password by going to rogers.com/forget.
  • Manage your account securely, including change of address and service upgrades.
  • Enjoy the benefits of Online Billing and Payment.
  • Learn about the latest promotions and sales.
  • Combine your invoices on one bill for easy payment.
  • Save up to 15% when you bundle Rogers services."

Apparently a lot of people forget their passwords.  Also worth noting, where is the semicolon after the phrase "you can".  Weird.  I guess I am now going to enjoy the benefits of resetting my password (perhaps daily) and paying them money more conveniently.  Plus, I can get discounts if I search for a better bundle.  Woot.  Life has never been this good.

Creating multiple item packages with Ubercart

Recently I have been working on a project which involves a lot of deep integration with Ubercart.  For those not in the know, Ubercart is a shopping cart system that is used by Drupal, the content management system I use for building websites.  Ubercart is not your only choice for creating a shopping cart, but it is well supported, easy to install and configure and generally up-to-date with modern features.  Except packages.

What are packages?

There are many cases where as a seller you will want to package goods together. For instance, if you are purchasing an item and you must get another product in order to make it work (and thus, make your client happy) you want to make sure they order both products at once.  A good example might be a computer that requires a special cable.  Without the cable the computer does not work.  We have to consider that people often forget to click both items, so we are going to find a way of getting around this so users can get more than one item with a single click, or in this example, simply by viewing a page.

Sometimes companies discount package items as well but I am not covering that here, if this is your intent perhaps consider setting up an "alternate" product with the cheaper rate to get the product into the package we are creating today.  I'm sure there are other ways, but let's save that discussion for a later date.

Where will the package live?

In most Drupal installations with Ubercart installed you create "Product" pages for your items.  We cannot do this for this example because the "Product" content type assumes one product at a time.  To get around this, I have made a new content type with a variety of fields that are necessary to describe the products.  By doing this, and using CCK and Views magic, I am able to customize the template for this type so that I can drop some PHP code in there.  Though I have not tired it, I suspect you may be able to make these API calls from the PHP-enabled pages in Drupal's editor as well.

Empty the current cart

Ubercart's API has a huge amount of information on different calls we can make for adding, editing, or removing items from the shopping cart but I struggled to find exactly what I wanted on the site.  To find the answers I needed I went right into the modules themselves and read the code.  I also found a few websites that told of the apprently secret API calls that do what we want.  So what are they?

The first call I made to Ubercart is a combination call:


What this does is empty the cart so that if people view our page more than once they do not see the items being added more than once.  There are different ways of doing this, for example, if you want to program a button on the page to do the actual adding of the items (which is probably ideal in most circumstances), you won't need this command at all.  For the page I was creating I want the cart to be filled up when the user views the page so this call prevents users from adding items more than once.

The second part of the call is the vital key to making it work - getting the user's cart ID.  In fact, this ID number looks a lot like the user's ID number so you could potentially take a shortcut and use that variable but I wanted to keep things pure, so let's use all Ubercart syntax if we can!

Add the items

Putting items into your cart requires two steps.  First, you have to reference the node where each product exists already.  So if you haven't put any items into your store yet you need to go do that, adding each component one by one.  Having done this, you have a "node ID" for each that you can use to add the items to the cart (when you edit a product you will see the node ID - a four digit number - in the address bar).

First, load the node into a variable on your page:

$product_1 = node_load(1234);

Provided that call is successful, you can now query all sorts of information from the product node within your package page.  Cool eh?  If you want to see all of the available information within a node you can use the print_r command like so:


Note that this command is not necessary for getting the cart to work but it is useful for debugging!

Now, you came here to add something to your cart right?  Ok, let's do it:

uc_cart_add_item("$product_1->nid", 1);

There, you have added the item to the shopping cart.  Note that there is a second parameter after the product node id (nid).  That is the quantity field.  You could specify a variable here or hard code a number as I have in this example.  You can use this same code to make sure someone buys five of something, ten of something, or more without them having to actually specify the quantity they need just by changing the second parameter.

The nice thing about this code is that it does not modify the checkout process at all so you can safely do this without disruping existing functionality on the site.  Users can still add or remove items on the checkout page but they will be much less inclined to do so if they know they are purchasing something as a package and it just took one click to load the cart up with everything.