Archive for the ‘Life: Work and Techy’ category

Extracting orders from Magento

June 12th, 2012

We’re just experimenting with TrustPilot at the moment, but we needed to be able to import the customer name, order id and customer email address from our Magento shopping cart system into their system for population. Here’s the simple MySQL query we used to extract these details of all completed orders (i.e. not pending/processing ones) placed in the last two months:

SELECT
sales_flat_order.increment_id,
CONCAT(sales_flat_order.customer_firstname,' ',sales_flat_order.customer_lastname),
sales_flat_order.customer_email
FROM sales_flat_order
WHERE
sales_flat_order.state='complete' AND
sales_flat_order.created_at>(CURDATE()-INTERVAL 2 MONTH)

WordPress PHPStorm coding standards

May 24th, 2012

I’m a regular user of JetBrains PhpStorm coding package and recently I’ve been doing a bit of WordPress orientated work – so how can I ensure my code matches the WordPress coding standards? Well, using Rarst’s WordPress coding standards helps.

  1. Just download the file and save it as “WordPress.xml” into your Php Storm folder such as .WebIde40/config/codestyles (on Linux, this was /home/[username]/.WebIde40/config/codestyles : I did have to show hidden files in Nautilus: on Windows it’ll be something like C:\Users\[username]\.WebIde40\config\codestyles\ ). To find your configuration file easily, run the following commands:
    • Linux: cd ~/.WebIde40/config/codestyles
    • Mac OS X: cd ~/Library/Preferences/WebIde40/codestyles
    • Windows: cd c:/Users/USERNAME/.WebIde40/config/codestyles
  2. Restart PhpStorm
  3. Load your project and go to “File -> Settings”
  4. Select “Project Settings -> Code Style”
  5. Select “Scheme: WordPress” and OK
  6. Select “Code -> Reformat code…” and wait for your code to be reformatted

This won’t catch every item (such as the Yoda conditions), but it’ll at least make it a bit closer.

Bye Bye Mangahigh – hello Bairwell!

November 28th, 2011

After just over 3 years working at Blue Duck Education Ltd as the Lead Developer/Systems Architect with Toby Rowland and other very talented people (too numerous to name here) building the Mangahigh Maths Games educational resource which we built from a brand new site to being one of the fastest growing educational games sites – I’m now leaving for pastures new.

So where am I going?

Well, my fiancée and I will be starting, on the 3rd of January, a new company called Bairwell Web Development to combine our two talents. Bairwell will be offering WordPress, Perch and LAMP (Linux, Apache, MySQL, PHP 5 : also some Varnish, PostgreSQL, Memcache, Perl and Systems administration) development consultancy services – so if you want a well designed (Katy), scalable and responsive (me) website: then please get in touch with us via our web development site (Katy is still working on it at this time of writing), Twitter or Facebook.

Fingers crossed!

Hosted GIT Repositories

November 26th, 2011

Many of you developers have used Github, but when you want an organisation’s code hosted (in private repositories), Github can be quite expensive. The current rates are:

Plan Price Private repositories Collaborators Disk space
Organisations: Platinum $200/month 125 Unlimited 60Gb
Organisations: Gold $100/month 50 Unlimited 20Gb
Organisations: Silver $50/month 20 Unlimited 6Gb
Organisations: Bronze $25/month 10 Unlimited 2.4Gb
Personal only: Medium $22/month 20 10 2.4Gb
Personal only: Small $12/month 10 5 1.2Gb
Personal only: Micro: $7/month 5 1 0.6Gb

(Disk spaces on Github are “soft-limits”)
All packages include unlimited public projects.

So, what alternatives are there?
» Read more: Hosted GIT Repositories

UK Black Friday Technical Discounts

November 25th, 2011

In the US, it’s “black Friday” which means that many companies are having some specials.

Here’s my recommendations of products which are available to people in the UK:

JetBrain’s PhpStorm editor
50% off Personal Licences. £38 instead of £77.
OS: Windows, Mac OS X, Linux
I’ve found phpStorm a lot better than Eclipse and Netbeans: and as well as PHP, HTML, Javascript syntax colouring and checking, it also does .htaccess files, YAML, XML and more (along with integration with GIT and others). Jetbrains also has the discount on WebStorm (same as PHPStorm, but no PHP editing) and RubyMine.
1Password password manager
About half price. $24.99 for a single user licence instead of $49.99
OS: Windows, Mac OS, iOS (iPhone/iPad)
Stores and manages your passwords and secure notes. Extremely useful and handy. Compatible with Dropbox, Chrome, Firefox, Safari, Internet Explorer: so you can have all your passwords on all your computers.
Apple
Discounts from all the range (£31 off the iPad 2, £81 off a MacBook Air)
Prag Prog (Pragmatic Bookshelf)
40% off all items
Offering 40% off all of their products when the coupon code “turkey” is used. Quite a selection of books, but I’ve not tried them before…
Lavasoft Ad-Aware Pro
Save $20
OS: Windows
Buy the popular anti virus and anti spyware application for $9.95 instead of $29.95. I’ve found their free Ad-Aware application extremely good.

Any other tech deals available today to people in the UK that you know of?

gamy-dance
%d bloggers like this: