Discussions

Rendering Add to Cart Buttons in Drupal Custom tpls: A How-to Guide

Rendering Add to Cart buttons causes a lot of confusion, it seems. I recently needed to do it on a ctools plugin content type and I wanted to share my experience (and victory) with the community:

WRONG approach - I was attempting to use drupal_get_form() to create the add-to-cart button like this in my template_preprocess function:

Posted: Mar 13, 2014
Subscribe to RSS - ctools