Tag: programming

0

WooCommerce: Use Product Images as Category Images

So, earlier this morning I found myself wishing that WooCommerce had the capability to use a product thumbnail when displaying a category link in situations where the category doesn’t have its own thumbnail defined.

I went on a bit of a hunt and found a couple of small plugins. One didn’t work at all, which I attribute mainly to it having not been updated for two years and much changing in both WordPress and WooCommerce since then, and another one that I found didn’t work until I made a couple of code changes – and had a couple of noteworthy problems;

  • it would only fetch product thumbnails from that immediate category – not delving deeper down into the category tree and fetch product thumbnails from child categories, and
  • it did no filtering for products that had no thumbnails set, so would in some cases return products that had no thumbnail

So, I’ve made my own. A zip download can be found below, you just need to drop the folder inside it into your wp-content/plugins folder and then activate the “WooCommerce Category Product Thumbnails” plugin.

I’m using WordPress 4.8.2 and WooCommerce 3.1.2 – please let me know in the comments if it doesn’t work on other versions.

Download the plugin (1.6KiB Zip)

0

Site upgrade

I’ve spent the last couple of days converting my site to the WordPress platform, rather than using my own bespoke content management platform.

It’s taken me far too long to start espousing the benefits of WordPress over other systems, but having done an increasing amount of work with it in the last year I’m now happy that the majority of problems I had with it are no longer an issue, so why not take advantage of it, eh?

I’ve also changed the underlying markup to be based on the Bootstrap framework (version 4 alpha, to be precise) so please do let me know if you spot anything amiss.

0

Xinha – hidden editors do not initialise correctly

As most web developers will know, there’s a plethora of tools out there on the Web that can provide What You See Is What You Get (WYSIWYG) editing capabilities within web browsers.

My weapon of choice in this arena has always been Xinha – pronounced Xena (like the Warrior Princess) – mainly because the editor itself is very configurable and easily integrates into my custom Content Management platform.

I came across an issue this morning however, where having multiple instances of the Xinha editor on a single web page – with some of the instances initially hidden, caused problems. When the hidden editors were made visible, they didn’t work properly – they were frozen and did not respond to mouse or keyboard input.

I’ve come up with a quick workaround that gets around the problem without requiring much in the way of recoding.

Read full post >

0

Games That Never Were: Arena

As some people may know, I’ve dabbled in the world of game development before. I’ve never been particularly good at it, if I’m honest, not really down to anything other than a lack of good ideas, and a lack of time to do any ideas I had justice.

It’s something I keep meaning to have another bash at, not in any serious manner of course, just in a "bedroom programmer" kind of way.

Still, I thought I’d make a post about a game of mine that never quite made it past development. It ranks as the most ambitious game project I ever undertook, and actually got quite far down the line.

The year was 2002, and the game was called Arena: Multiplayer Deathmatch and, as the name suggests, it was an Internet/LAN deathmatch game designed for up to 32 players (although I only ever tested it with 4 or 5 before the project kind of fell by the way side.)

 

Read full post >