I've been going back and forth for a couple of hours now and I'm just not finding a solution anywhere. Having used snippets from here and Lullabot I've setup my module but this code only changes the "Add to cart" button for 1 specific product. I'd like to change it per product type. What do I need to change?
<?php
/**
* Implementation of hook_form_alter().
*
* The function is named modulename_form_alter.
*/
function mymodule_form_alter(&$form, $form_state, $form_id) {
// Normally a switch is used because you may want to alter more than
// one form and it is easy to add a new case for each form.
switch ($form_id) {
// This is our form ID.
case 'product_add_to_cart_form_39':
$form['submit']['#value'] = t('register');
break;
}
}
?>The following did not work:
<?php
case 'product_node_form';
?>Thanks for the help
Francois.
