Add Custom Image Field to WordPress Theme Customizer

To make the theme preview work, in JS in the admin you will need to add… Then to output in your theme you can either output directly using… However, since we are saving this in the DB as an attachment ID, you will probably want to create a template tag function to convert it to […]

How to Setup a LAMP Stack on CentOS

For the purpose of this tutorial, we will use yourdomain.tdl as our domain.  Anytime you see something like {yourdomain.tdl} or anything similar enclosed in curly braces, please replace with the text specific for your setup. Install Apache Server on CentOS Install Set to startup Apache on boot Open this configuration file /etc/httpd/conf/httpd.conf, uncomment the following […]

Magento Custom Price Lost on Order Edit

This is an annoying bug that is still an issue with the current version of Magento (v1.7.0.0 as of this writing).  I have opened Issue #27867 with Magento and am hoping that this can finally be resolved in the core code.  In the meantime, to fix this issue we need to make a tweak to […]

PHP Tips to Display Errors, Warnings and Notices

Adding these two little lines at the top of your code can often solve a world of questions you have on why your code isn’t working. Make sure they are placed at the very top right after the opening <?php tag. If anything is output before them it will not work properly. Another helpful tool […]

How to Fix Slow Product Saves in Magento

In earlier versions of Magento you may have noticed that saving products is horribly slow especially as your site grows.  This problem originates from a bug in MySQL 5 (bug #42259) where using “IN” can dramatically decrease performance.  This appears to have been corrected in Magento 1.7.x.  However, if upgrading isn’t an option for you […]

Create MySQL Database and Add New User (command line)

Here is a quick example of how to create a database, assign a new user and set their password. Connect to MySQL server as user “root” (you will be prompted for a password) The “mysql>” prompt will now appear. Create new database… we’ll call it “orders” Give user (named “fluffy”) full permissions Set password for […]