Remembrance Sunday – Poppies at Conisbrough Castle

In remembrance for 100 years of the Battle of the Somme, local people and businesses donated towards lighting up Conisbrough Castle.

The castle was lit up for 3 days, and raised well over £1500 for British Legion and the renovation of the local cenotaph/park.

It is estimated over 5000 people came to visit and view the display. The display even appeared on BBC News!

I took lots of pictures, here’s a selection of mine:

Gousto Meal Box – £25 off First Box

A few weeks ago I visited a country fair and got talking to a rep from Gousto. Having taken up his time, I signed up for a reduced rate trial of their boxes…

The idea behind the boxes are to have fresh “meals” delivered to your door, (well the ingredients, ready for you to make at home), each containing an exact amount of food required to create a meal. For example if the recipe requires 10g of Ginger, then you receive exactly 10g of ginger.

The meals had good instructios to follow and only took 20-40 minutes to cook.

For my first box, we had:

  • Chicken Teriyaki with Sugar Snap Peas
  • Cheesy Baked Fish with Courgette Salad
  • Mexican Pork & Black Bean Rice

Overall I was very impressed with the first box I received. Inside the box, the perishables where stored in a biodegradable bag, complete with ice blocks to keep them cool. The meals are different to what I would normally eat, but this is good in a way as it’s exploring new meals and opening my mind to new dishes.

With the discount code JONAT161748, you can receive a £25 discount off your first box and give it a go..!

£25 off first Gousto box

FreeAgent Discount Code – 10% Discount Each Month – 454elo1w

Free Agent is an online account package aimed at small users / businesses, including:

  • Sole Trader
  • Partnership / LLP
  • Limited Company

It offers the following features:

  • Overview Dashboard
  • Estimate Creation and Management
  • Invoicing
  • Personal Expense Management
  • Project Management
  • Time Tracking
  • Payroll
  • Backing
  • Accounting
  • VAT Declarations
  • Self Assessment Calculations
  • Corporation Tax Calculations
  • Dividend Vouchers

One of my favorite features is being able to automatically import bank statements from various banks into the package. Another is the dashboard which shows the expected Corporation Tax payment due, so this can be taken into account before Payroll is run etc.

I currently use this software for my own business.

In order to receive a 10% discount, simply quote the following code:

Or alternatively follow this link to receive your 10% discount off FreeAgent.

Magento Order Status Flow

With Magento, the order status flow can be quite confusing.

The following diagram from MBS is useful in understanding the status flow:

It’s worth noting the following too:

  • An order can be “held” from any state/status in Magento
  • When “Unholded”, it goes back to the previous state/status
  • Once an order is “Cancelled” or “Closed”, it’s impossible to change state or status (except “Hold”)
  • An order cannot go to “Complete”, until everything is invoiced and shipped
  • An order cannot go to “Closed”, until all it’s items are refunded

Magento Order Status Flow

URL Encode String in SQL

URL Encoding is the transformation of special characters into a form which can be passed over the internet. A good example being ” ” (space) which should be replaced by “%20%”.

The following SQL function can be used to URL Encode a string in SQL:

CREATE FUNCTION dbo.UrlEncode(@url NVARCHAR(1024))
    DECLARE @count INT, @c NCHAR(1), @i INT, @urlReturn NVARCHAR(3072)
    SET @count = LEN(@url)
    SET @i = 1
    SET @urlReturn = ''    
    WHILE (@i < = @count)
        SET @c = SUBSTRING(@url, @i, 1)
        IF @c LIKE N'[A-Za-z0-9()''*\-._!~]' COLLATE Latin1_General_BIN ESCAPE N'\' COLLATE Latin1_General_BIN
            SET @urlReturn = @urlReturn + @c
            SET @urlReturn = 
                   @urlReturn + '%'
                   + SUBSTRING(sys.fn_varbintohexstr(CAST(@c AS VARBINARY(MAX))),3,2)
                   + ISNULL(NULLIF(SUBSTRING(sys.fn_varbintohexstr(CAST(@c AS VARBINARY(MAX))),5,2), '00'), '')
        SET @i = @i +1
    RETURN @urlReturn

In order to use the function, call it as follows:

SELECT dbo.UrlEncode('This is a test, *&%"£$')

This gives the following result:


Thanks to Peter DeBetta for the SQL.

Magento Web Service Calls Maintenance Mode – SOAP-ERROR: Parsing WSDL

I’ve had an ongoing issue with a Magento installation. When the maintenance mode is turned on (with access restricted to a few ip’s), web service calls using v2 SOAP API throws the following error:

SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://**URL**/index.php/api/v2_soap/index/?wsdl=1' : failed to load external entity "http://**URL**/index.php/api/v2_soap/index/?wsdl=1"

The web service worked correctly when the site was not in maintenance mode.

After lots of research, managed to find the solution. Basically Magento itself was throwing the error as it uses the PHP SoapServer to create the API. This object needs access to Magento in order to function correctly. As maintenance mode was enabled, the SoapServer didnt have correct permission, so was getting the holding page and throwing the error.

In order to fix the issue, the IP address of the server needed adding to the exceptions for the maintenance mode. Full details on how to do this here – Magento Maintenance Mode

Once the IP was added to the white list, the web service calls started working again correctly.