<?php
// $Id$
/**
* Implementation of hook_form_alter().
*/
function clientname_cart_form_alter(&$form, $form_state, $form_id) {
//only 'add to cart forms'
if(substr($form_id, 0, 28) == 'uc_product_add_to_cart_form_') {
if($node->sell_price == 0) {
// if 0.00 price, show 'call for quote' text
$form['qty'] = array(
'#type' => 'markup',
'#value' => '<div>Call for Quote</div>',
);
$form['submit'] = array(
'#type' => 'markup',
'#value' => '',
);
}
else {
// if >0.00 price alter the form
$form['qty'] = array(
'#type' => 'textfield',
'#default_value' => '1',
'#description' => '',
'#size' => '1',
'#maxlength' => 4,
);
}
}
}