Magento: Removing links in the navigation block by name or by label

Posted by Stuart Forster on 11th May 2012

Sometimes in Magento you may want to remove links from the customer navigation block. What you'll notice is it's actually quite hard to do so because there is no 'remove' method.

In this tutorial I will show you had to extend Mage_Customer_Block_Account_Navigation to include an extra two methods, one to remove links by name and the other by label.

Read more... [Post Comment]

Extending the Magento API

Posted by Stuart Forster on 27th April 2012

Magento: Extending the API

As UK Magento Developers we often find the need to extend the Magento API. This is actually quite easy to do.

In this article I will show you how to take the sales order API and extend it to automatically capture any payment when an invoice is created through the API.

Read more... [Post Comment]

Recursively Deleting all SVN folders

Posted by Stuart Forster on 20th April 2012
Tagged: linux, svn

Here's a quick code snippet for how to recursively delete all SVN folders.

Read more... [Post Comment]

Allow Google Chrome and other browsers to search your site directly from the address bar

Posted by Stuart Forster on 10th April 2012
Tagged: open search

GW Open Search

If you type into your address bar in google chrome 'gravitywell.co.uk' and then press space, you'll notice it says 'Search Gravitywell Blog:'.

We can do this because we have an OpenSearch Description meta tag that links to an OpenSearch Description file.

........

Read more... [Post Comment]

Howto: Merge Javascript and CSS files in Magento

Posted by Stuart Forster on 13th March 2012
Tagged: magento, js, javascript, merge

During a lot of the Research and Developement I've done on Magento websites, one of the pitfalls I often notice about other peoples magento websites is that they haven't bothered to merge the Javascript and CSS files.

This is a very simple task - and I'll show you how to do it.

Read more... [Post Comment]

Linux: Copying from one folder to another without overwriting any existing files

Posted by Stuart Forster on 13th March 2012
Tagged: copy, cp, gnu-cp, gnu, linux

Here are a few tricks on how to copy files in linux from one location to another whilst not overwriting any files.

Using GNU Copy (which is not included in all distributions) you can simple use the -n (--no-clobber) option like follows:

cp -n /source /target

But, if you happen not to be using GNU copy, a nice little trick I found is to do the following:

yes n | cp -i /source /target

As you can see - I'm simply piping an n into the cp command to tell it not to overwrite any files.

Another option is to use RSYNC, example as follows:

rsync -r -ignore-existing /source/. /target/.

Read more... [Post Comment]

Magento: How to fix double ampersand "&" in product attributes in version 1.6

Posted by Stuart Forster on 8th February 2012

Magento v1.6 seems to have an annoying bug where by it double escapes the ampersand in product attributes.

If you have, for example, 'Love, Luck & Happiness' as a value of an attribute the following will occur:

'Love, Luck & Happiness' becomes 'Love, Luck & Happiness'.
This then gets double escaped to become:
'Love, Luck & Happiness' 

Here's how to temporarily fix that.

Read more... [Post Comment]

Deploying PHP Apps to Heroku

Posted by Stuart Forster on 20th December 2011
Tagged: PHP, heroku, saas, paas, deploying, git

Recently Heroku and Facebook partnered to offer free app hosting on Heroku.

But Heroku didn't support PHP right? Correct.. Until now.

Read more... [Post Comment]

Sugar Coated Cupcake Ipsum

Posted by Stuart Forster on 15th November 2011

Another Lorem ipsum, this time with extra flavour! Just came accross this: "Cupcake Ipsum".

Give your placeholder text some extra love!

http://cupcakeipsum.com

Read more... [Post Comment]

Howto: Stop Postfix from HELOING as localhost.localdomain

Posted by Stuart Forster on 4th November 2011

Recently, one of our newly setup mail servers was being added to Spamhaus XBL blacklist because it was HELOING as localhost.localdomain. This would prevent emails from reaching alot of addresses if not fixed (We found this issue during site testing!)

The quickest way to address this (since our /etc/hosts file was correct) was to edit the main.cf postfix configuration file.

You can find the file at /etc/postfix/main.cf.

Open up this file, find the line that says myhostname and change to what you want it heloing as. Now all you need to do is request removal from the blacklist (should take no more than 15/20 minutes).

You're done!

Read more... [Post Comment]

< Previous 1 2 3 4