Wordpress Bash Install Script

This is post is now quite old and the the information it contains may be out of date or innacurate. If you find any errors or have any suggestions to update the information please let us know or create a pull request on GitHub Easy peasy: #!/bin/bash wget http://wordpress.org/latest.zip unzip latest.zip cp -rf ./wordpress/* ./ handy little bash script to install word press

TomatoCart UK

This is post is now quite old and the the information it contains may be out of date or innacurate. If you find any errors or have any suggestions to update the information please let us know or create a pull request on GitHub Edmonds Commerce are big believers in open source software and especially open source ecommerce packages which are our speciality. There is an excellent selection of open source ecommerce platforms available today including Magento and Open Cart, old favourites like osCommerce (Zen Cart, CRE Loaded) and Presta Shop. Read On →

Magento date() Wrong + Solution

If you are finding that your calls to date() etc are displaying the wrong time then this is the solution for you. Magento sets the internal time reference to UTC which does not account for daylight saving time adjustments. To get the correct date for your store, you need to get the store time, so the correct method is like this: echo date('l, F j, Y, H:i:s', Mage::app()->getLocale()->storeTimeStamp());

Magento View SQL For Collection

If you are working with collections and would like to verify that the actual SQL being used is what you expect it to be then this little tip might prove really handy. For any collection you can call the method getSelect(). This retrieves the actual Select object that handles the query. If you cast this select object to a string, you get the raw SQL query, so for example the Read On →

Failing to Create Foreign Keys (errno 150) + Solution

This is post is now quite old and the the information it contains may be out of date or innacurate. If you find any errors or have any suggestions to update the information please let us know or create a pull request on GitHub If you are struggling to get some foreign keys set up on your MySQL InnoDB database then perhaps this is your problem and a pretty simple solution. Read On →

Magento Detailed Exception Log

I have never been a particular fan of PHP’s standard stack trace - it tantalises you with a short snippet of info for each step of the trace that always seems to miss off the really useful bit of info. I have done previous posts before on how to get a more detailed stack trace. If you want to have this in Magento you need to edit Mage.php (I currently don’t know a way of overriding Mage.php) with this code (around line 724) /** * Write exception to log * * @param Exception $e */ public static function logException(Exception $e) { if (!self::getConfig()) { return; } $file = self::getStoreConfig('dev/log/exception_file'); //self::log("\n" . Read On →