Drupal Migration from Location to Address Field Mapping

With Location module quickly becoming obsolete, replaced by the dedicated separate modules: addressfield, geofield, and geocoder, it's handy to have a copy paste mapping to translate the data. Here's a field map from location to addressfield format for you.

Bulk Updating Magento Product Prices

Had a client that needed to increase their prices by 1.58%, across the entire store. They used base product prices on configurable products with super options that had their own price modifications. Think: Product A - $10. Option A (`12 oz ) +$2. The sql queries below will update the product tables as required. Note that these work only on static price adjustments, not percentage. Though, that should be easy enough to figure out given the below tables


Adding Canonical Tags To a View

The Metatags module is great. The things it does automatically across the system is really fantastic, but there's one major problem. It can't add tags to views. That's not so bad, except that paged data might really benefit from canonical links. There are multiple modules in development right now that could be used to solve this issue, but nothing I've found that is really solid. So, here is a simple hook fix you could implement from a custom module to handle the gap for now.


Drupal Development Settings.php Additions

When doing frequent work for a client, you'll often need to pull the database down. There's a pretty large cost to doing this at times if you have to constantly change variables to suite development needs. Thankfully settings.php (which should never be in a repo, and thus never reach the production server), provides us a way to override variables using the code base.



Subscribe to Fragmented Thought RSS