2 replies [Last post]
gizmatix's picture
Offline
Joined: 09/09/2008
Juice: 159
Was this information Helpful?

I tried

function fresh_media_uc_product_add_to_cart_form($form_state, $node = array() {
unset($form['qty']['#title']);
$form['qty']['#default_value'] = '0';
$output .= drupal_render($form);
return $output;
}

someone mentioned that it's not being called. has anyone found a way around this?

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: How do i set qty field for my product page to 0 instead of 1

I think you want to use hook_form_alter() to do that. You'll have to add a check to the $form_id so that you're modifying the right form. Alter hooks also don't require any output or rendering, since that will happen automatically.

gizmatix's picture
Offline
Joined: 09/09/2008
Juice: 159
Re: Re: How do i set qty field for my product page to 0 instead

Thanks Lyle appreciate you taking the time to comment back Eye-wink