Yearly Archives: 2012

Maintaining Lightbox2 Templating

Lightbox2 is a very popular and powerful Drupal module. One of the helpful features is that you can render a Drupal node in a lightbox rather easily in either PHP or HTML. View detailed explanation. The issue is that when you click

Tagged with: , , , , , ,
Posted in Development

Drupal 7 – Commerce Migration Class

Here’s a migration class I’ve been working on to import 8200 products. The biggest feature of this code is that it will automatically create a single product display node that groups all products who share the same “grouping identifier.” So,

Tagged with: , , , ,
Posted in Development

Google Docs Website Uptime Monitor

A few months ago a colleague pointed me to a few blogs that were sharing Google Docs spreadsheets that offered free uptime monitoring for websites. Here are the original links that I checked out: labnol.org techawakening.org The original spreadsheet (first

Tagged with: ,
Posted in Development

Quick Tip: Adding a Reset button to a Drupal form

Using hook_form_alter or hook_form_FORM_ID_alter one can easily add a “Reset” button to a Drupal form. In this example we’re actually trying to reset anything the user typed after the form loaded. This will not remove the default values. Here’s a simple example (Drupal 6)

Tagged with: , , , ,
Posted in Development

Drupal Commerce Add To Cart Form Tweaks / Registration Improvements

In this example I’m showing how to improve the Add to Cart button for Drupal Commerce products to show differently based on whether or not users have already purchased a product, or whether the product is already in their cart.

Tagged with: , , , , ,
Posted in Development

Views Exposed Filter: Terms for current language only

I’ve been working on a multilingual site that has a product finder. We have 3 exposed filters that allow a user to select an Activity, IP Category, or Industry. All of these filters are Taxonomy Term filters. Some of the

Tagged with: , , , , ,
Posted in Development

Creating a Link on a Product Display Node to Edit a Referenced Product

Drupal Commerce is amazing. On a recent project I had the pleasure of working with it for the first time. I understood the link between products and product displays, but there were a few things that bothered me about the

Tagged with: , ,
Posted in Development

Disabling the “Read more” link if specific conditions are met

Here’s a simple way to remove the Read more link at the module level (in Drupal 7). Sometimes this is preferred over doing it at the theme level (because maybe we don’t want the link to appear no matter what theme is being

Tagged with: , ,
Posted in Development

Proximity by City or Zip Code in Drupal 6 with Location and Views

The location module for Drupal 6 is a robust module. On most projects, it gives us 100 percent of what we need. Proximity searching based on zip code is built-in and fairly painless to setup. I’ve recently been tasked to also allow

Tagged with: , , , , , , ,
Posted in Development

Webform for Campaign Monitor

Webform is an amazing module. Thankfully, you can extend it to make it even more helpful. We’ve had a lot of clients that offer a “Join Our Mailing List” type of functionality on their sites. These forms are typically one or

Tagged with: , , ,
Posted in Development