Commerce

Drupal Commerce Responsive Checkout Tables

Submitted by swim on Fri, 06/06/2014 - 04:18

Providing a responsive checkout is an important feature of any eCommerce site. Drupal Commerce if themed correctly handles this fairly sweet; except for one element, tables.

Here is a quick solution which leverages stacktable.js. Automatically applying it to each views table instance during the checkout process. Simply add more form_id's to extend this functionality to other pages.

Drupal Commerce checkout pane validation

Submitted by swim on Tue, 02/11/2014 - 04:24

This article will contain a super brief summary of some of the gotchas when adding custom validation to checkout panes. Commerce checkout panes handle validation on an element level, validation handlers should be attached to the button. However this is not always possible.

For example, say you have embeded a custom form into one of your checkout panes. Validation for this form must be declared in hook_commerce_checkout_pane_info or hook_commerce_checkout_pane_info_alter

Drupal Commerce extending reorder module

Submitted by swim on Tue, 11/05/2013 - 04:09

Below is a very simple bit of code which extends Drupal Commerce reorder module. The code places an AJAX form on all commerce order entities allowing users to reorder from the order details page. This form functions exactly like the module button but with no redirect after the reorder has been triggered. One could easily add this in with a $form_state['redirect'].

Subscribe to Commerce