Re: Re: this setting is not available anymore?

pcambra's picture
Offline
Bug Finder
Joined: 01/23/2008
Juice: 251
Re: Re: this setting is not available anymore?

I think that tapir interface went away in UC2, I have made this workaround for my project, in a custom module:

<?php

function mymodule_form_alter(&$form, $form_state, $form_id) {
  if (
$form_id == 'uc_cart_view_form') {
   
//This line disables qty column
   
unset($form['items']['#columns']['qty']);
   
//This loop denies access to all qty fields for the form
   
foreach($form['items'] as &$item)  {
      if (
is_array($item) & isset($item['qty'])) {
       
$item['qty']['#access'] = 0;       
      }
    }  
  }
}
?>
Hide QTY field in cart By: jdblank (11 replies) Sun, 01/06/2008 - 19:20