code

By rprice , 9 August 2012
We are still responsible for adding the additional products to the user's cart when selected. We do this by adding custom submit handlers to the form. In this case we add two custom submit handlers, one before the standard one to clear the cart in case there's anything else in there, and one after where we add the selected optional products.
By rprice , 3 May 2012
* Choose a range of content types and taxonomy vocabularies. * Results are sorted by relevance (number of matching terms). * Select which node view mode to use for results display. * Define a set number of results shown (defaults to 5). * Results can be shown as a cycle slideshow. (http://jquery.malsup.com/cycle/) * Optional "More link" can be appended to the bottom of the bean.
By rprice , 3 May 2012
In the end, one argument against using Views for our content queries overrode all others: we wanted our client to use Views. Our client had specified that once they received the sites, their own developers would be using Views to build blocks and pages themselves. We knew that if we worked in Views for our own work, the Views we created would eventually be exposed to them, which leads to possibilities of regression and error. We wanted our core querying functionality to continue to function without concern that it might be tampered with.
By rprice , 3 May 2012
wondering why I wouldn't just build this in Views. Indeed, this might look a bit masochistic if you're used to Views. However, there are a few things to consider: EntityFieldQuery is core. If you are interested in keeping your installation as lean as possible, this is something to consider. Views is a contributed module, and so it automatically adds size and overhead to your Drupal install. EntityFieldQuery is small. The amount of code required to generate an equivalent listing in Views, compared to what we built above, is much, much greater.