Commerce: Diffrent text to add to cart button in product list and in product page
You should be able to use $node->type if you add this first

$node = menu_get_object();


Remember to check if $node is NULL and $node->type is set.

Also if you're wanting to use the "add to cart" hook_FORM_ID_alter() then the function name needs to be something like

custom_form_commerce_cart_add_to_cart_form_alter()