Magento Cron on Media Temple Grid (GS) Server

I ran in to a challenging situation the other day.

I recently helped fast-lane an ecommerce site for a small book store, and the traffic has been booming. Where I expected a few dozen orders out-of-the-gate, and to slowly correct any issues, it blew everyone’s expectations away, taking in hundreds of orders the first week. They’ve seen over 2k orders (that’s individual orders, not dollars) in less than a month. Awesome for the bookshop! Not so awesome for the over-whelmed dev :x

Initially, Paypal was the only payment gateway, and Paypal sends confirmation emails when orders are placed.

No news is good news, right? Wrong.

We integrated another payment gateway, only to realize┬áMagento wasn’t automatically sending out order confirmation emails… All of the prior order confirmation emails had been┬ásent by Paypal. And Magento hadn’t sent squat! Ruh-roh.


PHP Header not working due to Unicode Signature (BOM)

I was editing a site for a customer in Dreamweaver CS5.5, and I was redirecting an old page to a new version via PHP (though a 301 is the proper method, but that’s another post):

<? header(‘location:’); ?>

Simple enough? Nothing before or after. Certainly no spaces. These were the only characters in the entire file.

Except, upon checking out the page, I received an error:

Warning: Cannot modify header information – headers already sent by (output started at /home/www/redirect.php:1) in /home/www/redirect.php on line 1

Hmm. But there isn’t anything else on that line…


Simple jQuery Smooth Scroll with Scroll to Top

Just a few snippits that combined to make a simple jQuery smooth scroll, scroll to top feature.

It’s not flashy, and I’m sure there are 100 ways to do it better, but this worked for me.