»
S
I
D
E
B
A
R
«
Magento: Setting Abandoned Nochex order to Pending
Oct 16th, 2010 by Simon

We were seeing our abandoned Nochex orders set as status Processing – exactly the same order status as a fully paid up order. The fix is hacky but simple.

In the file app/code/core/Mage/Nochex/Model/Standard.php add the follwoing bolded line into the getStandardCheckoutFormFields () function:

/**
*  Return Standard Checkout Form Fields for request to Nochex
*
*  @return  array Array of hidden form fields
*/
public function getStandardCheckoutFormFields ()
{
$order = $this->getOrder();
/* set order status to pending until they come back from Nochex*/
$order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, true)->save();
if (!($order instanceof Mage_Sales_Model_Order)) {
Mage::throwException($this->_getHelper()->__(‘Cannot retrieve order object’));
}

/**     *  Return Standard Checkout Form Fields for request to Nochex     *     *  @return  array Array of hidden form fields     */    public function getStandardCheckoutFormFields ()    {        $order = $this->getOrder(); /* set order status to pending until they come back from Nochex*/ $order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, true)->save();        if (!($order instanceof Mage_Sales_Model_Order)) {            Mage::throwException($this->_getHelper()->__(‘Cannot retrieve order object’));        }

It actually sets the order to Pending Paypal status, but it’s better than sending out an order to someone who hasn’t actually paid for it.

Simon

New Purchase
Sep 30th, 2010 by Simon

I just bought this website

Skin Care Science

Don’t hate me. It’s a bit rubbishy right – with no actual science about skin?

Hey ho
Simon

Shaken: Saw a road traffic accident in Southall
Aug 11th, 2010 by Simon

I was riding home tonight and I hit traffic as usual coming into Southall town centre. I weaved through stationary traffic and at the head of the queue was an HGV (just the cab). It had its hazards on and just as I pulled up behind it I thought it had been in a crash. I saw some debris in the road a few feet behind the truck.

As I drew up beside the debris I saw it was a walking stick. Just then I saw the driver of the lorry climbing out of the truck clutching a mobile phone to his ear. He looked as white as a sheet. I thought he’s probably embarrassed about breaking down and across two lanes of rush hour traffic.

As I slowly passed the lorry I saw him. Under the passenger wheel was an Asian man. He didn’t look old, he had jet black hair. He was still and blood was pooling around his head. From the brief glimpse I got as I passed he looked like he was pinned under the front wheel.

I must admit I panicked at that point. My usual response is someone else will deal will it. I knew the driver was probably on the phone to emergency services and there looked to be lots of bystanders,

All this flashed through my mind briefly as I moved past the accident. However not 30 feet from the site is Southall police station. It crossed my mind that the Police have better first aid training than me, so I slewed the bike into their car park and ran into reception.

The officer behind the glass screen was talking to a customer, but after some slight banging on the door, she came out to ask what was wrong. I told her about the accident and she dropped all of her her clients and with a colleague, ran out of the police station.

I don’t know what happened to the guy under the truck. I don’t know why I’m writing this apart from it’s part of my life and it’s slightly cathartic.

Made me think about life a bit anyway
Simon

WordPress on Nginx Permalinks giving you 403?
Aug 4th, 2010 by Simon

I am running Magento and a WordPress blog on Nginx. URL rewriting was working fine on Magento, but whenever I added a location block for /blog/ with the rewrite rule in it, I got a 403 error for the blod directory.

It turns out that this is because you have redeclare the default files for this directoy, then do the rewrite, like so:

location /blog/ {
index index.html index.php;
expires 30d;
if (!-e $request_filename) {
rewrite . /blog/index.php last;
}
}

Importing a Magento DB backup
Jul 13th, 2010 by Simon

Very public not to self:

It seems importing a Magento backup into MySQL via the command line you have to do it from a regular command prompt, not a MySQL prompt.

Drop and create a fresh DB
mysql> drop database shop;
mysql> create database shop;

Then exit and do this from a command prompt
[root@]# mysql -uroot -ppasswordgoeshere shop < backup-20100713182416.sql;

Cheap Mobile Phone for Holiday
Mar 11th, 2010 by Simon

mini mobile holiday phoneThis is a good idea. You can buy a mini mobile phone that’s SIM free for only £19.99.

You could get a PAYG SIM for it too if you’re afraid of losing the phone.

Check the deal out here

This is how I want to go
Mar 10th, 2010 by Simon

This a real story out of the Hastings Observer. It seems this man decided to commit suicide by stabbing himself in the groin with a giant souvenir pencil.

And here’s me with a really giant pencil. Wish my groin was this big.

Sharon Osbourne Takes Plastic Surgery Too Far
Mar 1st, 2010 by Simon

Sharon Osbourne G2

Air Fresheners – Fresh Ideas
Feb 22nd, 2010 by Simon

USB Air Freshener

USB Air Freshener

Me and the girlfriend were talking about how air fresheners seem to be the most innovative sector of all fast moving consumer goods. As you do.

Everytime we see a new advert for air fresheners we groan, wondering what they have done now to make me want a new air freshener.

In recent years we have seen:

  • motioned trigger air fresheners
  • power point plugin air fresheners
  • dual scent air fresheners
  • air fresheners disguised as pebbles
  • air fresheners disguised as candles
  • air fresheners for toilets
  • air fresheners for cats
  • Anyway, I was wondering where the air freshener industry was going to take us next. Here’s my best guess at the future of air de-odourisation solutions.

    Aromatherapy Air Fresheners
    These will pump our peppy citrus smells in the morning and calming lavender scents in the evening

    Fan Driven Smell Dispersal
    A squirt of scent only permeates so far into the home. What we need is a squirt, then a huge gust of air to waft the smell into all the nooks and crannies.

    Home Selling Air Fresheners
    They say that when you are showing potential homebuyers around a home you should bake a loaf of bread at the same time. It makes the house seem more homely. Why not let a air freshener make your house smell like a freshly baked loaf.

    Personal Air Fresheners
    This would be a pendant you wear that contains a motion sensor. Every time you stop still – it releases a puff of pleasant scent. Great if you’re visiting public toilets.

    Air Fresheners Disguised as Flowers
    Flowers are meant to smell nice aren’t they? These definitely will as they are filled with lab produced chemicals.

    Film & TV Licensed Air Fresheners
    If you are watching a film like avatar at home on your HD TV – you want it to be as immersive as possible. Why not get an Avatar air freshener that for 3 hours pumps out the smell of Pandora’s forests.

    Remember Scents
    Smells are often linked very closely with memories because the olfactory bulb in the brain has intimate access to the amygdala, which processes emotion, and the hippocampus, which is responsible for associative learning.

    Why don’t companies release scents of the 80s (brut & bubblegum) or scents of the 90s (sweat and mdma)?

    These would take us back to a simpler time when we didn’t have to worry so much about what our house fucking smelt like.

Search Blog Name Suggestions
Feb 19th, 2010 by Simon

At work recently we were recently asked for naming suggestions for the blog. Here’s mine.

Search Box
The entry into the search World

Search Monkey General’s Amazing Tales
You’ve got to read it to believe it.

Canine Fatty Lumps
Or any other random search term (apart from dogging in Bridgeport)

No Results Found
Not something on our search – because we’ll return any old shit

iRelevance
Relevance is the key to search.

Query Deary!
Going after the pink searches

Al Go-rhythm
A blog under a witty pseudonym

Crush Google
A blog that outlines our ultimate goal

Telescope
We search the Sky

Stop and Search
Because you look suspicious

Crazy Search Science & Stats
Nice alliteration and it says what it does on the tin

SearchLight
Casting light on searches

Vanity Search
A vanity search is when you search for your own name.

3 Searches
There are 3 types of search. Navigational, Informational and Transactional (pr0n fits into all 3)

10 QPS
10 queries per second is what we do at peak times (maybe).

»  Substance: WordPress   »  Style: Ahren Ahimsa