Yet another blog (hopefully a useful one though)
Utility PHP Email Detection Script

I wrote a little function to check the formatting of an email so I thought I would share it with the world:
<?php function is_email($email) { if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)){ return 1; } else { return 0; } } ?>
No comments yet.
Magento: jQuery Accordian Menu
March 6, 2010 - 1:58 pm
Tags: jQuery, Magento, navigation, php
Posted in Code, Magento | 52 comments
Ok here’s how to make a dynamic jQuery sliding accordian menu in Magento, as seen on http://www.waterfrontbathrooms.com/.
Waterfront bathrooms also has a dynamic tree menu system to deal with there being more than 2 levels of categories, but I’ll cover this in a future post.
Magento – Show cart quantity
March 6, 2010 - 1:05 pm
Tags: Magento, php
Posted in General | 14 comments
If you’re putting a shopping cart area anywhere other than the standard cart side block, then you’ll probably want to show how many items are in the cart at any one time. Here’s how:
Magento – Handy code snippets
March 6, 2010 - 12:57 pm
Tags: Magento, php
Posted in Code, Magento | 3 comments
Here’s a short list of magento codes to do some of the simple stuff. It’s a little empty at the moment but I’ll keep adding to it over time. Check if customer is logged in <?php $_customer = Mage::getSingleton(‘customer/session’)->isLoggedIn(); if ($_customer) { // do stuff } ?> Get product image <?php echo $this->helper(‘catalog/image’)->init($_product, ‘image’); ?> [...]
Magento – Show image from a random product in a specific category
March 6, 2010 - 12:39 pm
Tags: Magento, php
Posted in Code, Magento | 5 comments
A website we developed recently required some boxes on the homepage that link through to a specific category each, and each box needed to show an image from a random product from within that category. If you would like to do the same, here’s how it’s done: Create a PHTML file in your template folder, [...]
Magento – Swap product image on thumbnail click
March 6, 2010 - 12:10 pm
Tags: Magento, php
Posted in Code, Magento | 9 comments
One of the most frequent requests we get for Magento sites is to tame what the thumbnails do on the product page. Of course there are plenty of plugins for adding a lightbox of some sort, but if you simply want to swap out the image in the zoomer window for one of the thumbnails, [...]
Magento SagePay Form
February 25, 2010 - 3:15 pm
Tags: Magento, php
Posted in Code, Magento | 14 comments
SagePay is the UK and Ireland’s most popular payment gateway and Magento is rapidly gaining popularity so the absence of a SagePay Form Magento plugin is not ideal. Hopefully we have helped to fill that gap with our free plugin available at http://www.magentocommerce.com/extension/3060/sagepay-formerly-protx-form.
MS Internet Magento Easy Pre-Installer
February 18, 2010 - 11:42 am
Tags: Magento, php
Posted in Code, Magento | 2 comments
To speed up the process of uploading the Magento software without SSH access we have created this easy downloader to fetch and unpack the files and install the sample data in a MySQL database.
How to get ImageMagick to Convert pdf’s with GhostScript
December 14, 2009 - 5:22 pm
Tags: Code, ImageMagick, php
Posted in Code | 2 comments
Ok, this is one for the nerds. I have spent most of today trying to figure out how to get ImageMagick to convert a pdf file to an image. First I installed ImageMagick fine: > wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz > tar xvfz ImageMagick.tar.gz > cd ImageMagick-6.5.8 > ./configure > make > make install Then I installed the [...]
How to fix PushIt WordPress plugin wp-admin 500 Error
November 14, 2009 - 8:21 pm
Tags: php, wordpress
Posted in Code | 4 comments
We had a client with a mysterious plugin related server error when they tried to access thair admin dashboard with output: /*pushit_user_row_phone_variable_define_start*/ $phone = isset($user_object->phone_number) ? get_user_mobile($user_object) : “not set”; /*pushit_user_row_phone_variable_define_stop*//*pushit_user_row_phone_variable_insert_start*/break; case ‘phone’: $r .= “$phone”;/*pushit_user_row_phone_variable_insert_stop*/ They said that the problem had happened immediately after installing the PushIt plugin. So, we took the usual action [...]