WooCommerce passes 150,000 downloads

Congratuations to WooCommerce on passing 150,000 downloads in the WordPress plugin repository. I’ve used WooCommerce on several E-Commerce websites and it’s the best solution for WordPress based sites that I’ve come across so far.

XKCD Kickstarter

First thoughts on FuelPHP

I’ve been using CodeIgniter for about 4 years now, although not so much lately (I’ve been doing a lot more WordPress development recently). After my break from PHP frameworks, I decided to take a look at the options for a side project I’m starting and decided to give FuelPHP a go.

Although I can’t give a comprehensive review of it just yet, first impressions are very positive:

  • It seems very well thought through and simplifies some of the common stumbling blocks
  • It’s very feature rich, but for a framework that’s “based on the best ideas of other frameworks with a fresh start”
  • Very easy to pick up. I’ve not yet looked into some of the more complex parts such as the ORM, but what I’ve seen so far is very intuitive and standardised

Hopefully more FuelPHP stuff to come in the future!

Pull request etiquette

Lately, I’ve been trying to get more involved in the communities areound the open source software I use on a daily basis. Although this can take many forms, including contributing code, helping out in support forums, writing documentation, testing and more, I’ll be focusing on the first of these. To cut a long story short, I’d forked the project on GitHub, made my modifications and sent a pull request. And then I waited… … And waited some more… … Nothing. I was annoyed This was the first time I’d attempted to contribute to the core of an open source project,…

QR Code Generator Bookmarklet

If you ever need to generate a QR code for the current webpage, there is a very handy bookmarklet on Google Code.

For me, the main use for this, isn’t to create a QR code to share with others, but for a convenient way for me to open the current page on either my iPhone or iPad — Just scan and it’s done.

View on Google Code.

Adding password field to Gravity Forms

By default, Gravity Forms doesn’t include a password field in the various field types you can use, but it does have that functionality built in. All you have to do, is add the following code snippet to activate it.

add_action('gform_enable_password_field', '__return_true');

That’s it – The Password field type will now appear under advanced fields.

Pricing your product is actually simple, as long as you consider it from the buyer’s point of view. How much it costs you to make something is irrelevant. They don’t care (of course, you can’t price something at a loss and hope to stay in business for long).
Seth Godin

It’s so simple, and yet most people overlook it! Read the full article for the 2 main factors to consider.

WordPress Plugin: Imposter

I’ve just released my first WordPress plugin — Imposter.

This allows website administrators to take on the role of other users, which is useful for development, testing and troubleshooting purposes. When they’re done, they just logout to revert to being themselves.

You can read more about it on my plugin page.

Google Webmaster tools prompts to update software

Just logged into my Google WebMaster Tools account for the first time in what seems forever, and noticed a very nice touch. It prompts you to update your CMS if there’s an update available (in my case, I’d not updated to WordPress 3.3.1 in 3 weeks!).

This is a seemingly small detail, but it’s often the small details that make a product or service a success or failure.

Modify the JigoShop Cart widget

JigoShop is a great E-Commerce system built on top of WordPress. As part of a site I was working on, I needed to display the contents of the basket in the sidebar — A common need for an E-Commerce site. So I went and added the widget, which is shown on the right, however I needed to tweak it slightly. Most of it could be done via CSS, but I also needed to change the text of the buttons, however there was no way of changing this when adding the widget. I had a look at the source code for…

Terse JavaScript 101 — James Padolsey

James Padolsey gives a great summary of shorthand alternatives for your code, which will make it quicker and easier to write, and be easier to read.

Although I knew most of them already, there was still a few things I learnt, so well worth a read, even if you think you know it all (not that I do).

View original article

Multipack Presents, February 2012 Writeup

On Saturday, I attended the first Multipack Presents event of 2012 in Birmingham. It was a great day full of interesting topics and presentations, and many geeky conversations over a beer. The general theme was about converting side projects into a business, with many of the presentations focusing on the speakers personal experience of converting a side project into their full time job. One of the points made very early on, was that we’re fortunate enough to work in an industry where we’re very passionate about what we do, however that doesn’t mean we shouldn’t try to push that further.…

Mercedes-Benz Tweet Fleet

Using YouTube oEmbed to get meta data

I was recently working on a site with user generated video content. All the videos were hosted on YouTube, and users could add a new video to the site, by submitting the URL.I’ve previously used the YouTube API to get data from YouTube, but it was messy at best. WordPress makes it very easy to embed a video from YouTube on your site, as it will automatically convert a YouTube URL in your content into an embedded video. It does this using oEmbed, which got me thinking… Using oEmbed to get data from YouTube Unfortunately, all WordPress does, is convert…

Any fool can write code that a computer can understand. Good programmers write code that humans can understand.

Martin Fowler

Adding product to basket in Ubercart causes checkout bug

As part of a site I’ve recently been developing using Ubercart, I needed the ability to be able to add an item to the basket via a URL. Getting a URL to trigger an event was trivial, using the following code. First, you setup the URL pattern to trigger a callback function: Next, I setup a simple callback function, which would get the Node ID from the URL, and pass it to the uc_cart_add_item function and then redirect the user to the checkout. I tried this, and it seemed to work, however I later realised that the delivery pane had…

Get pages by template in WordPress

I’d originally posted this on the WordPress StackExchange site, but thought I’d share it here as well. If you ever need to get pages which use a certain template, you can use the following query. You can then use the loop as normal to iterate over the pages, as well as expanding on the above query, such as setting the order. It may have once been useful to be able to just specify the page template in the query with an additional parameter, but I feel the widespread need for this is now gone, as many cases which would use…

Better auto updating copyright date

At the start of every year, there always seem to be several blog posts about how to automatically update the copyright date in the footer of your site. These all seem to rely on using the date function in PHP to output the current year. Although this works fine in most cases, it falls apart if in the first year you want it to say just 2012, but next year you want it to say 2012-2013 instead of just 2013. If we wrap this logic up in a function, it will be able to automatically display either just the single,…

Estimates or “How to dig your own grave”

This is part of the series covering the PHP Nw 2011 conference. View the rest of the posts on this event here. This was one of the best talks that I’d attended, despite not being about PHP, but about the problems with estimates and how to avoid them. Rowan wasn’t even shaken by the multitude of technical issues which delayed it, but I’m sure he’d factored in the risk of that happening. The talk was split into two main parts, starting off with the possible mistakes, and then how to spot problems and resolve them. It’s certainly making a difference…

Google Reader modifications using GreaseMonkey

Google Reader has recently received the visual update which has been available for most Google Services over the last few months. On the whole, I like the style and think it’s much cleaner than the old one. Despite this, it’s not perfect in my opinion, with my biggest complaint being how it styles the collapsed list of items. As this is the main way I consume content via Google Reader (and then click through to read the full article on the original website), it’s reduced how quickly I can scan a large list of content. I tweeted about this frustration…

Goodbye And, Hello MC2

Goodbye And! Today marks my last day at And Digital. I’ve been here for 15 months, having joined right out of University. At the time, I wasn’t actively seeking employment, as I was freelancing so that I did’t have to settle for “any old job”. After a few jobs at And Digital, they offered me the job, and shortly afterwards, I was a full time employee there. In my time here, I’ve worked on a wide range of projects and moved from being “just a developer” to having a wide range of roles, and become very competent with WordPress. I’d…

Web app lock in – Getting your data out

As more and more desktop applications are being replaced with their web counterparts, data ownership is becoming an increasing concern – At least it should be. The problem is, the more you invest into a system, in terms of time and data, the more you tie yourself to it, until one day, you want to leave. The reasons for wanting to leave can vary from cost, a change in your requirements, or simply a better product/service elsewhere. Whenever you need to switch, there is always a cost associated, be it money, time or both. At work (And Digital), we’re currently…

New site launch

UPDATE: I’ve now replaced the “Lorem Ipsum” with actual content, but everything else below is still valid. Today I launched my new site, but unlike most site launches, it’s half missing. Currently, the only real content is on the homepage and the blog. There are some screenshots of a few websites in the portfolio section, but the text is all “Lorem ipsum”, as is the about page. So why have I done it? Why would I take down my existing site and replace it with this one? Firstly, this version has no less content as the old site has almost…

Removing fields for logged in users in Gravity Forms

Gravity Forms is one of my favourite WordPress plug-ins due to it’s ease of use, flexability and extensibilty. In a recent project I needed to be able to show or hide a set of fields dependant on if the user was logged in. Although Gravity Forms allows for conditional fields, these are dependant on other form fields. As part of the registtration process, we collected numerous pieces of information, and many of the same fields would appear in other forms within the site. Why should users who have already registered and given all that infoamtion once have to do it…

Simple stats collection with CodeIgniter hooks

Yesterday, I launched the alpha version of Project Trackr, a web based project management system I’m working on. As well as the feedback I would receive from the users themselves, I wanted some additional data. I wanted to track the users journey throughout the site and to get some quantitative data on on the usage of the application. With this information, I would know which features are popular are which features aren’t being used, and I could then try to find out if they’re not being used because they’re not useful, their implementation is poor or people just don’t know…

Easy chained select using jQuery

Whilst working on Project Trackr, I had the need to be able to easily add chained selects within a form, more specifically, I wanted selecting an account or a client from a drop down list to load another drop down list beneath it with users in that account. An easy way to do this would be to register a listener on a given ID, when something in that dropdown is selected, fire an AJAX event and then load the response contents into a pre specified div. Easy enough and it works, but I wasn’t satisfied. I wanted a solution which…

Getting full auto complete with CodeIgniter in Eclipse

CodeIgniter is a brilliant PHP framework and Eclipse is a brilliant IDE, so if I use them both, then it will be super brilliant? Not quite. In CodeIgniter, if you want to use one of the many fabulous libraries, such as the Database Active Record class, then you need to load it (using autoload or manually) but that happens at run time. What this means is Eclipse (and most IDEs for that matter) don’t know what $this->db is which means you don’t get auto complete. This isn’t really a problem, but it’s a great place to have a couple of…