remove weight and dimensions

Posts: 5
Joined: 02/15/2008

Hi, i am also new to Drupal and Ubercart.
This is how i implemented the hook_form_alter to remove those 2 fields on my site.
I don't know if it's the best practice or not but it works.

<?php
function moduleName_form_alter($form_id, &$form){

// remove weight field(s)
   
$form['base']['weight'] = array(
//        '#weight' => 15,
//        '#theme' => 'uc_product_form_weight',
   
);

// remove geometrical dimension fields
   
$form['base']['dimensions'] = array('#type' => 'fieldset',
//        '#title' => t('Dimensions'),
//        '#description' => t('Physical dimensions of the packaged product.'),
//        '#weight' => 20,
//        '#theme' => 'uc_product_dimensions_form',
   
);
}
?>

If there is a better way to do this please let us know.

Many thanks to the Ubercart team for such a wonderful ecommerce solution.

Removing SKU on product edit page By: jag (26 replies) Tue, 12/11/2007 - 23:12