TidyBlog

The place we write about web design, organic search and business...

Category Archives: General

With August now a distant memory, we are now creeping closer to shorter days, colder mornings and dare I say it closer to the ‘C’ word. As a mother, I always love this time of year. We have my eldest sons birthday at the end of September, a month later we celebrate Halloween, and five weeks later the advent calendar and Christmas duvet covers come out of the loft.

At Tidy, we know that this time of year can also be our busiest. Clients are coming back from summer holidays, and they have an abundant list of website updates for us. We also tend to get updates sent in November time, ready for the new year ahead. I always feel that Autumn tends to bring a buzz at both home and at the office.

I am all too aware however that this time of year, can also bring dread to many. The days of constant rain, plummeting temperatures, and the repetitive replay of ‘Now That’s What I Call Christmas’ throughout the supermarket, can even make the die hard fans of this season feel like booking the first plane out to somewhere hot.

With the mutter of warmer weather making a return to us next week, I am not ready to write off Summer just yet.

Whilst on holiday in Italy this summer I did a lot of drawings, most of these doodles got given to my two boys who coloured them in, however a couple I kept for myself… Below is an olive tree, a quick pen sketch I did following a drive around Umbria, viewing its many olive gardens.

Here are a few photographs I took of an olive garden, some pretty spectacular scenery;

Following my olive tree sketch I started work on an olive tree branch, probably my favourite doodle of the holiday…

Personally I find illustration, fine art, painting etc a great escape… It really helps me to unwind and switch off from the busy World we live, a World heavily influenced by tech, social media and computer screens. So to conclude; I hope you liked my olive tree / olive branch sketches, please visit our illustration page for more tidy art, doodles and paintings…

I am from an era where the internet did not exist at one point in my lifetime. I have just turned 30, and by no means do I feel old….yet! I even remember listening to a debate over the radio which my parents had put on in the car many years ago, on encyclopedias v internet. Need I say more.

It still amazes me however, how technology and the web based world has evolved in the last three decades. Many of us will remember watching Back to the Future II, and thinking how amazing would it be to have a telephone conversation with someone where you can actually see them at the same time on the screen! Who knew that 28 years later, we would all be making those sort of phone calls on a daily basis and not have to worry about any extra charges for it.

I was also from a generation where the mobile phone was only just coming into popularity for both the old and young folk. I think I was 14 years old when I got my first phone. My 7 year old nephew has his own iPad!

With this advance in technology, it opens the world of possibility to people. It can create knowledge, power and even love. However it can also create a lot of issues that perhaps people never foresaw. As a Mum of two boys, I worry about giving them a facility where the world (good, bad and ugly) is at their fingertips.

For now though I have comfort that they do not know my password for my phone or iPad, and they have never asked for it….yet!

The only one advance in technology that still hasn’t come to fruition, is the expandable pizza that takes two seconds to cook. One can still live in hope.

Evening all, it has been a while! Tonight I thought it a good idea to write a quick blog post, something to say “hi, Tidy Design is still here!” and “thank you clients old and new, you have been keeping us very busy!”

Tidy Design – Guest Speakers at ASSIST-CKD

Testing 1 2 3 – getting ready to present…

Since I last sat down and wrote a blog post so much has happened, it is hard to know where to start. We have designed and launched several new sites, worked with Kidney Research UK to develop some life changing software, taken on a few new NHS projects, recruited, processed hundreds of website updates and celebrated a Christmas / New Years!

Christmas 2016

Finding the time to write new blogs posts and update our website (portfolio page) has been difficult, but this is something we are working on so please stay tuned – thank you for visiting.

As we are drawing to a close for 2016, Team Tidy is drastically trying to get projects complete, updates signed off and all to-do lists highlighted with ticks.

This morning I ordered another 200 Nespresso capsules, only a mere five weeks after I placed the last order. That works out at 4 espressos a day for each of Mike and Jonno. If only the rest of the world could be powered with our version of fuel… coffee!

The more we get signed off however, the more work that keeps coming in. We are by no means complaining, we love how our business has evolved over the years and most especially over the past few months, but things at our HQ in Old Portsmouth are far from winding down. Mike has recently got back into the design elements of the business, and is relishing the opportunity to design something that doesn’t involve creating and drawing scary sea life creatures for our two young children.

Jonno’s keyboard is in overtime and there is a constant musical tap that can be heard from the other side of the room. I wager that no one can type quicker than him! And for me, well amongst bookkeeping and ordering the coffee, I try to keep an optimistic face on it all. I like to think we have a happy office atmosphere, and for some strange reason we all differ so much from each other, but we just click. Pardon the pun.

We say it every year, but without out our loyal customers, old and new, we would not be in this very fortunate position.

We are still avidly recruiting, and are searching for someone who can contribute to our ever growing empire. If you think you fit the bill, then we would love to see your CV and portfolio, which you can email to jobs@tidydesign.com. It remains to be seen whether our Nespresso intake will increase as well!

A Fully Bespoke Rental Price Calculator

WooCommerce is a hugely popular free plugin for WordPress which can provide an out-of-the-box, totally functional eShop with products of varying complexity, various shipping and payment methods, and a comprehensive checkout process. For a “standard” shop selling Products, ‘vanilla’ WooCommerce is amazing – it can get you up and running insanely fast, with little to none in the way of necessary development work. But when you want WooCommerce to do something it doesn’t do, it’s time to get down and dirty with some code. It should be noted that WooCommerce has a huge community producing and maintaining plugins which provide extra or changed functionality – for the most part, desired custom functionality can be achieved with one or two well-chosen plugins. But when plugins either cost too much, don’t meet your needs, or even overreach your needs and thus become a burden on the system, the only real option is to begin writing some bespoke code to produce your feature.

At Tidy Design, I do a lot of work with WordPress and WooCommerce, and more recently I’ve delved into pushing WooCommerce’s core functionality to produce a new shop for rental products. By default, the extent of WooCommerce’s options surrounding price is being able to set a sale price – but the requirements of this site included Products which have up to four price “brackets” which are used in a custom calculation on Product pages based on a customer’s input rental period. That’s quite a leap from WooCommerce’s default behaviour!

So let’s think of what exactly is required to get this working on a basic technical level:

1: Custom Product Data; the 4 price “brackets”. This must be configurable per-Product by administrators.

2: A “rental period” input on Product pages, representing the number of weeks the customer wants to rent the Product for.

3: A magic background calculator which can return a correct price for a given Product and rental period.

4: The ability to override the price for a Product in the cart, based on what was returned by the calculator.

Adding custom data to Products is a trivial two-stage (or in WordPress terms, a two-hook) process involving adding custom inputs to “edit Product” pages, and saving the values entered when the Administrator updates the post. I won’t cover that here because it’s a very “Googleable” subject – but in case you’re wondering, the first hook (adding custom inputs, specifically to the “Product Data” general tab) is

“woocommerce_product_options_general_product_data”

, and the second is

“woocommerce_process_product_meta”

– in which you’ll use WordPress’s built-in function “update_post_meta()” to write the values to the Product.

In the same way, adding a custom input to Product pages is trivial. The hook required depends on where you want the input to go. Mine is displayed above the normal Price output, so I used the hook

“woocommerce_single_product_summary”

to output some custom HTML.

The really interesting parts here are requirements three and four – the magic calculator, and overriding the WooCommerce price. Logically, the best option for the calculator was an AJAX function which is triggered by changes in the rental period input. WordPress has a hook-based method for adding AJAX functions that can be secured properly.

The below depicts a function which should receive a Product’s ID and the desired rental period, and return a calculated price.

So, at this stage, we have custom Product data depicting the various pricing brackets for different lengths of rental, we have a custom input on the Product page which allows a customer to request rental of any length in weeks, and we have a magic AJAX calculator which will return the correct price based on that input. The last stage is to tell WooCommerce “this is the price of the Product” when it is added to the cart.

By default, WooCommerce will take a Product’s regular or sale price as the price to display in the cart (and contribute to cart totals) – so we need a way to replace it. The first consideration might be to overwrite the regular and/or sale prices of the Product so that WooCommerce can just find the calculated price in the normal way. But consider what would happen here if two customers were ordering the same product at roughly the same time – which overwrite of the Product’s price would take precedence?

Luckily, when a Product is added to the cart in WooCommerce, a new “Cart Item” structure is created to represent it. This Cart Item is separate from the original Product object, and contains the price that will be displayed. We can overwrite this to any value we like – in our case, the calculated price.

But where does the calculated price come from? In the above AJAX function, I return the price to the page (where it is displayed by JavaScript where WooCommerce normally displays the price), but I also store it in the PHP session; a place to store variables which are relevant to the current user and which you want to “carry across” different pages.

It’s generally best practise to either not use the PHP session, or make its use as temporary as possible – so before I write the cart price of the product I transfer the values out of the session and into the cart item, utilising some custom array keys so as not to interfere with anything default.

This is achieved with the hook “woocommerce_add_cart_item_data” – which is run after the construction of a Cart Item, allowing the addition or modification of associated data.

So now, when a Product reaches the cart, its Cart Item has two new properties containing our custom data; ‘custom_price’ and ‘rental_period’. Data stored on the Cart Item allows for default WooCommerce functionality will continue to work – for example, the “undo” button after removing an item from the cart will restore the Cart Item, any custom data included. If the values were still hanging around in the PHP session, I’d have to do some clever logic to delete and recover it. As-is, no extra work is required to maintain the custom data.

Now for actually writing the cart price, using the hook “woocommerce_before_calculate_totals”.

Quite simple, eh? All it does is take the previously-written custom price and copies it to the Cart Item’s price property. This is where WooCommerce looks to find the price to be displayed on the cart and to be considered in the cart totals.

So that’s it! All four technical requirements are met. We have our custom Product data, a rental period input on the Product page, a magic AJAX function and a mechanism for overwriting the cart price. In practice, this allows an Administrator to set up rental products which get cheaper the longer you rent them for, and it allows the customer to specify their desired rental period for every Product they order. Utilising the hook “woocommerce_cart_item_name”, I write out the rental period for each Product in the cart.

In essence, this is such a large functional change to WooCommerce that it could very well become its own plugin. I made careful considerations through all of the customisation (beyond what you see above) to ensure that only Products tagged as “Rental” adopt these changes, so this site can still set up and sell normal Products with set prices if desired.

The fact that I was able to implement this type of change goes to credit the incredible extensibility of WordPress and WooCommerce. Naturally, WooCommerce’s developers did not consider Products that work like these in their design process – but what they did do is make the system flexible enough that the remote developer has the opportunity to make them work.

It’s this extensibility and flexibility that have made me vow to never install a WooCommerce plugin. Anything that clients want is possible to achieve with a little bit of elbow grease and some well-placed hooks – though maybe one day I’ll produce my own set of plugins to re-use my custom functionality anywhere.

As Rosie deals with month-end, I can’t help but look at our office white board listing 30+ tasks for us to tackle in July 2016 – Yup, its going to be a busy few weeks!

This year (to-date) has been pretty interesting, highly productive and also challenging for us as a company. Overall Tidy Design is seeing a good level of growth however it is very important that we maintain a certain level of quality/support during these busier periods…

I guess we all have to grow with our business/brand; we are all responsible for its evolution and must react to planned or unplanned change…

All in all it has been a fantastic six months here at Tidy Design, a massive “thank you” must go out to our clients (old and new) for making this tidy adventure possible! Another big thanks must go to Blayne, Jonathan and Rosie – team tidy rocks!

A few weeks ago Solent Fire contact us to discuss their website, it was pretty dated and required a complete re-design. Working with Solent Fire we put together a couple of design concepts, these soon evolved into the new website, please see below:

We hope you like the look and feel of SolentFire.co.uk, Tidy Design is delighted with the end result. We are now discussing the next phase of website development, please stay tuned…

Finally, it was great to receive such positive feedback from Solent Fire on this project, thank you so much for choosing Tidy Design.

Hard to believe the first quarter of 2016 is already over – a massive “thank you” must go out to all our clients, you have kept us very busy!

All in all it has been an eventful three months for Tidy Design; we have started to work with several new clients, we have seen lots of repeat business, we have been interviewing, growing as a company and working very hard to deliver a quality service day in day out…

Doors certainly do open when you work hard; word of mouth is by far the best form of advertising (sorry Google) as this year has shown. From working with Portsmouth NHS two years ago we have now started to work with Wessex Strategic Clinical Networks, liaising with NHS trusts in Bournemouth, Dorchester, Hampshire, Isle of Wight, Poole and Southampton…

Website layouts can be one of the easiest but also one of the trickiest components of website design – it may take a few minutes to map out a website structure and design, it could take a few hours…

Each web design project is unique; this calls for a unique solution and approach to our clients requirements. Ok, there are several website layout guidelines we can all follow to create user-friendly layouts, these include; a good use of whitespace, obvious (and easy to follow) call to actions, consistent font styles, alignments, positioning and device compatibility…

If you would like to find out more then please do not hesitate to contact us, our office in Old Portsmouth is open weekdays, 9am to 5pm :)

TidyDesign

Subscribe to our mailing list

TidyDesign

Here at Tidy Design our mission is simple; to deliver a return on investment, be it for our customers or the staff we employ, working together we will do better. Each day we set out to offer our customers a quality service, the goal being to leave a long lasting and positive impression. Happy customers result in repeat business.

The staff we employ are very important to Tidy Design, our ethos is to look after each other and grow together. We aim to learn and do better in all aspects of life, this mindset is key to growth and development.

TidyDesign

Please note that cookies cannot harm your computer. We do not store personal information such as credit card details within cookies, but we do use cookies to help improve your experience on a website. Cookies are small files that many web sites transfer to your computer when browsing the web. They can inform companies what pages you visit and your site preferences, which enable businesses to provide a more personalized user experience.