Magento Inline Translate Not Working + Solution

If you are puzzled as to why inline translate in Magento is not saving a particular translation, this could be your issue. Inline translate uses the table core_translation to store the translations. The fields that store the data are set to VARCHAR(255) fields. If your source string is longer than 255 characters, it will fail silently to save the translation. The simplest solution is to shorten the source string and stick to using inline translate on strings that are shorter than 255 characters. Read On →

Extending Mage Core Encryption Model to handle Legacy Passwords

If you are migrating from an old ecommerce package into Magento, you may well want to extend Magento’s password hashing system so that it can understand the passwords that are hashed by the previous system and customers can log in using their old passwords without any hassle. You would start off by overriding the Mage_Core_Model_Encryption class like so: class EdmondsCommerce_LegacyPassword_Model_Encryption extends Mage_Core_Model_Encryption { /** * Validate hash against hashing method (with or without salt) * * Extended to support the legacy password hashing of the previous system * * @param string $password * @param string $hash * @return bool * @throws Exception */ public function validateHash($password, $hash) { if (/*password matches legacy pattern (as stored hash in DB)*/) { // create a hash of the plain text password and compare to the stored hash return $hashed_pass == $hashval; } //default magento hashing from here return parent::validateHash($password, $hash); } } However, you will find that the standard model override does not work and you may start vigorous hair pulling at this point. Read On →

Update Magento category attribute sort order from the database

If you have written your own modules, and need to rearrange the order that your attributes or displayed in, or change anything else, you can use the following SQL statements to fix their order. First you need to get the attribute group that the attributes are under. This can be done by running the following SELECT attribute_group_id, attribute_group_name FROM eav_attribute_group This will give all of the different tabs for categories as well as the products. Read On →

Magento Performance Problems

If you are having performance issues with your Magento store and you are running on a dedicated or VPS server that you think should be up to the task of running your store properly but you continue to have performance problems then this post is for you. Having decent server specification is only the first step on the road to having a high performance Magento store. Without proper configuration your server is not going to make the best use of its resources and that could make the difference of literally seconds or even tens of seconds of page load time. Read On →

Wordpress Upgrade Bash Script

If you would like to upgrade wordpress directly on the command line using bash then you might like this little script: #!/bin/bash # This is a script to upgrade wordpress. # Put it in your wordpress document root (the folder that contains wp-config.php) # chmod +x to make executable # ./wp-upgrade.bash to run # Originally here: http://yabfog.com/blog/2011/12/12/wordpress-update-bash-script DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" TMPDIR=/tmp/wp-upgrader mkdir -p $TMPDIR WPDIR=$TMPDIR/wordpress mkdir -p $WPDIR cd $TMPDIR rm -rf latest.zip ./wordpress # Clean up from the last run wget -nd http://wordpress.org/latest.zip unzip latest.zip mv $DIR/wp-config.php $DIR/.wp-config.php.backup # Stash your configuration someplace safe rm $DIR/*.{txt,html,php} # Delete the old install rm -rf $DIR/{wp-admin,wp-includes} # Delete more. Read On →

Ubuntu 10.10 is Dead... What next?

Today we and no doubt countless other Ubuntu 10.10 users got the dreaded: You can read the official announcement here. As everyone is aware, Ubuntu and Gnome have both moved towards a new desktop environment paradigm which is designed to be a bit more dumbed down and accessible to less technical users. Unfortunately its not really suitable for power users who might have a LOT of open windows spread over multiple desktops and often running multiple monitors. Read On →