Tags: Drupal 7, lightbox, templates, theming
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. The issue is that when you click a link within that lightboxed content, you will lose the lightbox2 templating. Read on for a quick fix.
Tags: Drupal 7, Drupal Commerce, Migrate
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, in my CSV import file I have a "grouping_identifier" column. If a product is available in ten colors, and they all share the same grouping identifier, a single product display will be created and each of these products will be referenced in it.
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:
Tags: Drupal, Drush, Python
I've been writing a few Python-based Drupal utilities to make automated backups and update reports simple. These utilities will be especially useful to people who manage many sites.
Tags: Commerce, Database API, Drupal 7, hook_form_alter
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.
Tags: Commerce, Drupal 7
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 relationship. This example demonstrates a simple administrative UI modification to make it easier to edit a product display node's referenced product.
Tags: Drupal 7
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 used).
Tags: Drupal, hook_form_alter, Ubercart
Here's a quick example that illustrates how to remove a few State/Province options from the billing and shipping panes of the Ubercart checkout form, as well as the order edit/create form. Please understand there are other ways to do this (like altering the united_states_840_1.cif file and re-importing). The hook_form_alter() method seems less permanent, so I favor it.
Tags: Drupal, PHP, Ubercart
This is just a quick code example. Imaging you have an Ubercart attribute that has several options and you'd like to show an "As low as $X.XX" price on the frontend. Here's a simple solution. Note that if you wanted the lowest price across ALL attributes you could loop through each attribute too (instead of just looking at attributes[1]).
Tags: Drupal, Drupal 6, PHP, Ubercart
This tutorial is for Ubercart versions later than version 2.3. If you're using an older version of Ubercart, you'll want to see this example. This example is very similar, but accommodates the changes made to the template system in Ubercart.