Category: Front Page

Without this category posts will not appear on the site’s front page.

  • Barrage 2017

    I think we may have been bitten by the convention bug (which is much better than being bitten by the convention squig — a very unforgiving biter) because yesterday we went to another wargaming show! This time we set up our stall at Barrage Wargames Show in Stafford: three glorious halls of traders and tabletop games with plenty to see and do. (Trust me: there was even a zombie hunt for kids.) For those of you who don’t know we currently live in Rotherham so we hired a car and made a day of it. Fang it!

    Our stall was in Hall 3 which we alternated between calling The Kiln and The Furnace throughout the day (Fox: The forecast was for 23º and rain! I brought backup trousers and a jumper!). We drank plenty of water and occasionally took a break by wandering through to the (slightly) cooler other halls filled with fun stuff.

    One such fun thing was the Mad Mekz Build-Off competition which we’d given a big box of miscasts and spares to. Nothing like watching your bitz come to life on the collective workbench! Six beautiful vehicles were born at the table during the day.

    There were three prize categories: the Gorkiest, the Morkiest, and the Orkiest! The lucky winners won prizes from Kromlech and every entrant got a limited edition sculpt from us. His name is Grodbukkit and he’s inspired by a certain friendly mechanic from the Mad Max video game.

    My favourite finds all day were two models from Oakbound Studio of my chap-hop heroes Mr. B the Gentleman Rhymer and Professor Elemental. I also picked up a carry case for my Shadow War team! Fox was a bit tighter so here’s a comparison picture of our respective halls. I’m the winner. Not financially but in nerd points.

    Shout-out to Dave’s Wargames; he had Fox kicking himself that he’d not brought more spending money! (Fox: He’s still wrong about Gorkamorka…)

    By the way, the Bloodbowl and Saga tournaments were clearly popular as they were still in full swing when everyone had packed up. I’d call that a resounding success!

    Cheers to everyone who organised Barrage and see you again next year!

  • ChillCon 2017

    Yesterday we packed our bags (six bags in total with one dedicated solely to snacks and lunch options) and took a hire car to Ecclesfield School in Sheffield — the venue for the first ChillCon gaming convention. We set up shop (pardon the pun) in the sports hall along with twenty-odd other traders and got ready for a full day of wargaming fun!

    The Big Mek had made the display stands himself and I’d made the oily-lookin’ table banner. We’d been prepping for weeks and we were really excited to finally be there. By the way: unexpected side effects of preparing for a trade show include several cuts, scars, and the sheer amount of Euro hole shapes to be found around the house… They’re everywhere.

    Anyway, back to the convention. We’d brought along several exclusive previews with us and a few just-for-the-day offers to tempt passersby with. You’ve probably seen us shout about them on social media in the run-up to the show (fear not: the products will soon be available in our online store as well). We even gave away some freebies!

    It was really good fun meeting some of our customers in person, catching up with a few old friends, and meeting lots and lots of new wargamers of all varieties. Chatting to Chill Con goers about greenskins and terrain options practically made the day fly by – thanks to everyone who came and talked to us, whether for a few minutes or a good deal longer!

    Another great thing about the day was meeting all the other traders and oohing and aahing over their stalls and products. I had an excellent time running around, talking to other stallholders, and rummaging through their goods (I gave in and bought a few things). I think we made some new friends and everything!

    As we were there as traders we didn’t get to see nearly everything on offer but in the hall next door there were all sorts of things afoot: tournaments, participation games, and cake. Yes, cake. We both had a glorious slice each before we went home that afternoon and it was delicious.

    Thanks to everyone who organised ChillCon – see you again next year!

  • Tiny tank!

    This weekend we’ll be running a trade stall at ChillCon ’17 but this post is only tangentially about that. Y’see, a while back I kitbashed/scratchbuilt a vehicle for my Warhammer 40,000 Ork army. An Ork Battlewagon named Olga.

    What’s missing? Gunz!

    I figured that much like on GW’s Battlewagon turrets are the answer! So I created some. James from LavaTurbine helped me out by cutting some mounting rings using lasers. I wanted these turrets to fit on other things as from what I can tell there’s a standard for these things across companies. Kromlech do some turrets, for example, that are supposed to fit on things like the GW Battlewagon. By using roughly the same standard my parts should fit on everyone else’s work as well as my own (and vice versa).

    So I have this set of turrets. Well, they’re cool on their own and great for scratchbuilds and kitbashes but wouldn’t it be nice if they had something else to ride around on? A tiny tank, perhaps?

    Maybe there’d be several designs? Interchangeable weapons? Yeah, let’s make that happen!

    I normally cast solid objects though. Vacuum and high pressure environments don’t bother them. Hollow things though, well, they either implode, explode, or both.

    The tracks you’re seeing are in pieces simply because I built them too well – they didn’t break apart in convenient ways to allow me to remove them in large pieces. Not a big deal as the casts were great. No, the problem is that the hollow interior couldn’t withstand the vacuum. The air inside burst out and the silicone rushed in to fill the gap. If you look carefully you can also see the crack on the underside of the body where the bottom buckled inwards!

    So nearly the entire body of the tank was filled with silicone, the rear detailing was ruined, and the mould was a write off. Oh and the small raised piece on the front (the block with the inset grille) withstood the vacuum but became concave due to the pressure. So that bit needed a rebuild too. Hooray.

    So I rebuilt the model from a resin copy, making a few alterations along the way, and now I have a functional mould. However all the extra time means that for now the other tank designs are going to have to wait. Lots of other things to be doing in the meantime!

    If we’re attending a convention we’re going to need product racks. They’re now built and nearly full of products. Still a load more casting to do and a few more moulds to make but hopefully that won’t present too many problems – there’s a heatwave this week and that means casting is much faster. Partly because I’m enthusiastic for being outside and partly because, well, chemical reactions are affected by heat!

     

  • Figuring out how to use the JigoShop API

    When someone orders stuff from Fox Box I get a notification email with the details. It’s functional but ugly. More to the point it’s not formatted for label paper of any kind. Something like this:

    You have received an order from Ben Fox. Their order is as follows:
    =====================================================================
    Fox Box
    admin@fox-box.co.uk
    ORDER #: 2588            Date: September 16, 2012
    =====================================================================
    1 x Ork Warbike 2 (#912) - £2.50

    The original invoice generator I wrote was both impressive and hacky. It would query the MySQL database, find the relevant order information, decode it, and spit it out onto a template. There may well have been a better way of getting information out of a WordPress database but that was a can of worms I was not going to open.

    Unfortunately by doing things this way I was locked in. As soon as the order information format changed the script broke. Annoying but to be expected, really.

    It was one of many reasons I held off upgrading to JigoShop 2.x. Luckily I held off long enough that JigoShop 2.1 was released and it included an API. An API is essentially a convenient way of talking to a program. Instead of dealing with the internal workings it offers a load of convenient ways to get information in and out of the program.

    The main problem I ran into with all this is the fact that, like many other things, the documentation explaining how to use it was written for people that already know how to use an API. I don’t expect it to explain the basics entirely but a simple “Don’t know what this means? Head over to [SITE] and take a look at their API tutorial.” would have helped a great deal.

    The first major problem was this: where is the API?

    The documentation talks about https://jigoshop.dev/api/v1/orders/:id

    Initially I thought this meant that my JigoShop instance would contact their servers to act as a middleman. Nope.
    There’s nothing in my files at https://fox-box.co.uk/api/v1/orders/:2588 either – it just throws a 404 error. I did find https://fox-box.co.uk/wp-content/plugins/jigoshop-ecommerce/src/Jigoshop/Api.php/v1/ but that seemed to be a dead-end too.

    I posted a topic about this over on the support forum but didn’t get an answer so eventually I emailed them to ask. It turns out that it is at https://fox-box.co.uk/api/v1/ but other bits of syntax were wrong. That colon? Yeah, that’s not supposed to be there. Not a clue why it is, convention I imagine.

    If you try visiting https://fox-box.co.uk/api/v1/orders/2588 you’ll get a blank page, not a 404. That means it’s working – but you don’t have authorisation to view the page. Further proof that it’s working can be found here: https://fox-box.co.uk/api/v1/ping

    {"success":true,"time":1494332877}

    That’s what we’re after! JSON encoded data! Nearly everything can easily process JSON and it’s quite easy to read without being a computer too. It’s just a load of “Variable name”: value – e.g. “name”: “Fox Box Frankenork”. So now it’s just a matter of how the bloody hell authorisation works.

    To people who know about APIs this is probably very easy stuff but for me it was a matter of trying to figure out how complex the problem is. APIs are usually aimed at developers and so the idea might have been that I was expected to code up something complicated that exchanged keys or did a special handshake or something.

    The documentation was… unhelpful. On my end I had a username, password, and “secret key”. The documentation told me I was supposed to pass a header with “Authorization: Bearer [token]” and then sort of wandered off to have a smoke or something.

    After trying various things I eventually figured out that by sending over the username and password it would send back a temporary token. I’d then use that token in future requests. Eventually it expires and a new one is needed.

    So I’d send:

    curl https://fox-box.co.uk/api/v1/token -X POST -u user:password

    The server would send back:

    {"success":true,"token":"[censored]"}

    Then I’d use that token to ask it for details about order 2588.

    curl https://fox-box.co.uk/api/v1/orders/2588 -X GET -H "Authorization: Bearer [censored]"

    Lo and behold I’d get this lot back!

    {"success":true,"data":{"id":2588,"number":"2588","created_at":{"timestamp":1347833013,"format":"2012-09-16 22:03:33"},"updated_at":{"timestamp":1493123797,"format":"2017-04-25 12:36:37"},"completed_at":{"timestamp":1347833059,"format":"2012-09-16 22:04:19"},"items":[{"id":null,"key":"2a9d121cd9c3a1832bb6d2cc6bd7a8a7",

    Then it was just a matter of figuring out how PHP talks to cURL (a little bit fiddly but not too bad) and sticking the relevant bits of info into the right places on the old form.

    So the old code might say:

    echo $order_details_unserialized['shipping_address_1'];

    The new way of storing order information doesn’t have address_1 and address_2, just address so the new code just says:

    echo $shipping_details['address'];

    Admittedly I also took the time to write a bit of extra code that would format addresses more appropriately for some countries. Lots of places use what I think of as the “European” style of address (Postcode – City rather than a separate line for the postcode) so the new system should result in better labels too now that it takes those into account. Similarly the US has state initials before their zip codes.

    I’d show you the result but seeing as examples contain personal details there’s not much left after I’ve censored them!

    Right, back to pouring resin into hollow blocks of silicone.

  • Timely references and CSS

    I’m not sure if I can face another perplexing error with the site. I’ve spent at least the last week or so attempting to upgrade the website.

    We run JigoShop as our ecommerce software and it in turn runs on top of WordPress. It’s far from the best solution but when we setup back in 2011 the other options we tried were worse. So for years we ran the 1.x series of JigoShop. There were tweaks and upgrades along the way but mostly it sort of haphazardly wobbled along.

    Some time in 2016 they released JigoShop 2.0. Unless there’s a serious problem I rarely upgrade software until it’s had time to get itself sorted. Bugs and other broken stuff are common. There’s nothing like exposing software to the general public for finding bugs!

    Anyway, a while ago I received an email telling me that JigoShop 1.x was being retired at the end of March 2017. There’d be no more support for it. Given that I’d had a few problems over the years it seemed like I’d best make plans to upgrade to the 2.x branch before some show-stopping problem forced the upgrade on me at an inopportune time.

    So…

    Well getting PHP upgraded was tricky. Well, the upgrade was easy – finding out what broke and why less so!

    One of the major problems that I only found mentioned in an obscure AskUbuntu comment was that it disabled short PHP tags by default. Simple explanation of what that means: there’s two ways to indicate that a text file contains PHP code:

    Long tags Short tags
    <?php
    
    code here
    
    ?>
    <?
    
    code here
    
    ?>

    Yeah, by default PHP 7.1 was set to only read code with the long tags. As a result loads of random stuff broke. I’m mostly mentioning it here in case it pops up as a search result for someone else and helps them!

    Anyway, eventually I got all the requirements sorted and it was migration time! JigoShop migrated all the 1.x data over to the 2.x software without error (impressive considering the hundreds of products in the database). Excellent stuff.

    Then came the problems…

    The first major one was the lack of an off switch.

    That is to say that in the 1.x branch of JigoShop there was a simple button in the admin panel to turn off their theme. Yeah, that was gone. Someone else had the same problem but the answer provided wasn’t helpful so I stuck my obnoxious oar in and eventually got enough of a clue out of the JigoShop support staff to figure out the solution.

    So their theme was turned off. Amazing! Except it’s 1999 up in here:

    That is to say they changed something making my theme no longer work. Themes use CSS to make pages look a certain way, that an a load of images, icons, and stuff like that. Well CSS code is generally written to apply to a certain thing on a page. There might be some stuff for the overall page but say a button used to have the identifier “button” and now its identifier is “btn”. You see where I’m going with this?

    So the last few days have been spent trying to find out what’s changed, what hasn’t changed, and trying to make things actually work again. It turns out that JigoShop has its own CSS but it also has CSS for some other stuff that it loads in – like the shipping calculator. That was so unbelievably broken until I figured that out…

    Those kinds of problems are within my ability although I had to learn a fair bit about CSS to get it done. Aside from being exhausting it was kind of fun. Also, importantly, I don’t touch the code of JigoShop – as soon as I start messing with that there’s no guarantee of the changes being permanent – an upgrade could overwrite the file and things would break again.

    The other kind of problems are settings in JigoShop that straight-up don’t work. Things that you’d think they’d have caught in 6+ months!

    For example:

    Only one of those items is in stock. Attempting to click the “Add to cart” button on the first two just pops up an out of stock notice.

    Great, thanks. I’m sure customers won’t find that bloody maddening. I’m not just having a moan – I filed a bug about it as soon as I found out. There’s some other corkers out there too although the one that really took the biscuit was the one I’m about to bore you with.

    I have a paid for extension to JigoShop called “Premium Shipping”. It lets me set weight ranges and destination countries to work out my shipping rates. Weirdly the cart on here says shipping is “estimated”. It’s not. What you see is what you’ll pay. Doing it any other way would be bloody stupid.

    Anyway, we’re talking about models here, not gym weights. I can’t set things to grams but I could at least use decimals. Could.

     

    Yeah, the 2.x branch of JigoShop only deals in whole kilos. They’ve since helped me fix that one but come on, how did no one fix that in the months that the 2.x branch has been out?

    That’s quite enough of that. Time for the good bits!

    The new software branch performs noticeably better. I was concerned I’d need to upgrade my server or something but not, the new code is fast and makes using the site much nicer. It wasn’t terrible before but it wasn’t something I was proud of either.

    Other good stuff – by getting my hands dirty with CSS I’ve changed a whole load of small things that in general make the site feel more polished. I feel far better equipped to deal with future challenges as a result. Even back when I was making web pages from scratch as a spotty teenager I didn’t understand CSS as well as I do now.

    So, this is basically a “soft” launch for our JigoShop 2.x install. Maybe later in the week I’ll be able to release some products and bang the drum a bit.

    If you’ve got any problems with the site pleaseplease, please let me know! We’re on Twitter, you can message us on Facebook, and of course there’s the contact form that emails me directly.