Submitted by Everett on Sat, 02/18/2012 - 20:13
This week I needed to design a checkout workflow that, depending on the contents of a users shopping cart, would separate the current cart into two, and allow the user to check each out individually. Drupal Commerce comes with cart and checkout modules, to enable users to add products to a shopping cart, and then to checkout of your store. The commerce_cart module is really designed for a 1:1 user:cart ratio. That being said, it is possible to allow users to have more than one cart.
Submitted by Everett on Sun, 02/12/2012 - 17:14
Until recently i was hosting my site on the AWS free-tier micro instance. This is a fully self-managed stack and I didn't mind this, it's nice to keep my system administration skills fresh (or a little less rusty). I've gotten busy recently, and wanted an opportunity to look at both Acquia Dev Cloud and Pantheon for Drupal hosting. The following is far less of a comparison than it is a brief synopsis of my experience with each.
Submitted by Everett on Thu, 02/09/2012 - 07:12
Notice: This article does not advocate the use of PHP eval(), but it was the fastest way to get done what I needed :)
Yesterday I needed a condition to ensure that a rule executed on one particular domain of a site running Domain access. The Domain module doesn't seem to provide a Rules condition, and a super quick search of Google didn't find one either.
In order to solve my problem I could either write a custom module that makes a Rules condition available, using hook_rules_condition_info(), or use the Execute custom PHP code condition, I chose the easy path.
Submitted by Everett on Thu, 02/09/2012 - 05:11
This morning I created a Drupal Rules module rule set component, which is being triggered with a reaction rule. Some of the rules in the set have actions that will trigger the reaction rule, but recursion isn't happening. This is good, I don't want any recursion.
To be on the safe side I searched to find out why recursion isn't happening.
We can see that in rules_element_invoke_component() recursion is being intentionally prevented.
Submitted by Everett on Wed, 02/08/2012 - 20:41
Today I needed to apply some custom discounts to orders in Drupal Commerce. The Rules workflow is:
- Delete any existing discount line items from the order
- Calculate possible discounts and add new discount line items to the order
I'm sure that there are other approaches, but this seemed simple (lol) and most importantly it seemed like it would satisfy my use case.
Submitted by Everett on Fri, 02/03/2012 - 20:02
I was moving some Drupal Commerce work from a local development environment to an integration and staging server this week, and realized that Commerce really does lack in its ability to have configuration featurized. I found the Commerce features module, which initially seemed like it would be quite helpful. Unfortunately, most of the commerce configuration that I was looking at is not featurizable using this module.
Submitted by Everett on Thu, 02/02/2012 - 18:35
EntityFieldQuery is a class that can be used to... query entities... by field! And, other things too.
Today I needed to get a list of all nodes, of a certain type, ordered by title. One might go to the database for this, but I decided to do things the 'right' way, by leveraging the Drupal 7 entity system.
Submitted by Everett on Wed, 02/01/2012 - 20:42
As the Drupal Core accessibility maintainer, I from time to time have people ask me about the accessibility of different contributed modules. Several times in the past I've been asked about the accessibility of Panels (where I assume the person means cTools Page Manager as well). Only this week have I had the need to use Panels and Page Manager. This is by no means a thorough review, but my observations as a screen-reader user.
Pages