Skip to content

Instantly share code, notes, and snippets.

View mbennett127's full-sized avatar

Matt Bennett mbennett127

View GitHub Profile
@mec
mec / remove image from cart
Created February 23, 2014 13:37
Took me ages to find this, using Ubercart 3.x, you want to remove the image from the cart display. Put this in your template.php
function example_form_alter(&$form, &$form_state, $form_id) {
// Alters the cart view form at /cart.
if ($form_id == 'uc_cart_view_form') {
// Hides the image column since courses don't have product images.
$form['items']['#columns']['image']['access'] = FALSE;
// Adds the label to the product description column from the image column.
$form['items']['#columns']['desc']['cell'] = t('Products');
}
}