Code

How to Migrate from SVN to Git on OSX

As I'm moving from Snow Leopard to Lion, I'm also in the process of updating my development environment, including MAMP, SVN, Eclipse, and more. I've decided to switch my versioning control from SVN to Git, mainly because Git is easier to work with, especially when it comes to merging, and I've had a lot of messy problems when working with SVN. Read more to see how easy it is to migrate.

 

Magento Custom Shipping Part 2: Order Handling Fees

So now that we've built the basic framework for a custom shipping module in Magento Custom Shipping Part 1, its now time to move on to the special business logic that my client needs.

My client isn't shipping the usual pre-packaged electronics and other consumer goods you usually find online. Instead, they ship a product priced in standard units of volume. And since shipping is by semi truck, there's a maximum and minimum quantity that can be shipped.

Setting the Maximum and Minimum are fairly easy using the built-in Cart and Product tools from Magento. But now we need to calculate shipping costs. My client's shipping is calculated using this simple formula:

Quantity of Material x Handling Fee (per unit) + Delivery Charge (per region)

The first part of this, the handling fee, is pretty easy. Read More to see how we add the handling charges to our module

Magento Custom Shipping Part 1: Build a Custom Shipping Module

I am developing an ecommerce site in Magento, when I ran into a wall with the built-in shipping system. To be fair, Magento's shipping is incredibly robust, with a lot of add-on plugins to provide any missing requirements. However, like many small businesses, my client has some very unique needs and business logic, which means there is no off-the-shelf solution for their particular scenario. In this case, they needed a custom shipping solution. The product is delivered in bulk by semi truck, and different local delivery areas have different pricing structures. Naturally, hooking into Fedex or UPS shipping systems would not fit the bill.

Read on for a tutorial on how to build a custom shipping module.

Hosting Drupal on MediaTemple's Grid Service

In this, my first screencast, I perform a basic speedtest of a Drupal 7 site on MediaTemple and BlueHost.

Over the years I've been very happy with my hosting provider, MediaTemple. They have some unique product offerings, their documentation is extensive, and their support teams are incredibly helpful. Not only that, but I live just a few short miles from their offices and datacenter, and I love to suppport local businesses.

However, Drupal has some specific needs when it comes to MySQL support, where it appears MediaTemple's Grid Service shared hosting plan is just not up to snuff. This screencast shows the results of my speedtest comparisons as I access the exact same Drupal 7 site installed on both MediaTemple and BlueHost.

On-Demand Image Loading with JQuery

Q: How do you load up a bunch of images in a slideshow without causing long page load times?

A: Load the images on-demand. Here's an example of how to load images on demand when using JQuery Cycle to run a slideshow.

MooTools 1.2 is finally in Joomla!

I'm happy to say that my previous post about using a modern version of MooTools in Joomla no longer applies. With the latest update to Joomla (1.5.20) a new plugin was added, providing MooTools 1.2.4, with backwards compatibility for Joomla extensions that relied on MooTools 1.1. This update came just in time for me as I was updating a client's site from Joomla 1.0 and had a lot of Javascript to rewrite with new dependencies and conflicts to avoid.

For upgrade installs, this plugin is not enabled by default.

Custom User Login Block on Drupal 6 Zen sub-themes

I was trying to override the login block displayed on one of my Drupal sites and I kept running into a lot of trouble. No matter what functions I tried overriding in my template.php, nothing was displaying. All the tutorials I could find online didn't take into consideration the specifics of using a Zen subtheme. Hopefully my guide here will avoid this problem.

JQuery trick while we wait for IE 9

I was just wrapping up a new website, when to my <sarcasm>big suprise</sarcasm> I found that it was broken in Internet Explorer 8. After doing various tricks to optimize and troubleshoot the code, I discovered that one feature in particular was working just fine in IE7, but was throwing javascript errors in IE8.

I'm utilizing the JQuery plugin MapHighlight to generate a fancy border/highlight effect on an interactive floorplan feature. It turns out, that in IE8, Microsoft removed support for a wildcard selector when creating VML objects. Luckily, this was a relatively easy fix, as someone already did the tough work for us.

Here's how to apply the fix yourself:

Font Embedding


Following up on my previous discussions about font replacement and font embedding

Using MooTools 1.2 in Joomla

MooTools is on version 1.2.3 (after completely dropping 1.1.1 as the default about a year ago), and version 2.0 is expected before years' end. Joomla however, still is including 1.1.1 because of compatibility issues with various plugins. People have been asking how to safely replace the version of MooTools included. Since I've done this several times, I figured I'd share my method here.

Pages