Hi,
it would be helpful if there was a permission to select roles to bypass checkout for node creation.
thanks

Comments

larowlan’s picture

There is a skip option, but yeah - only one permisison.
Would mean making an extra permission as well as this one
http://cgit.drupalcode.org/commerce_node_checkout/tree/commerce_node_che...

pinkonomy’s picture

Hi,thanks for the answer.
However I am not a developer,only a sitebuilder,so it would be nice if created a patch that could commited to the module.
thanks

pinkonomy’s picture

Also is this possible to do this with rules?If yes,how?
thanks

pinkonomy’s picture

Also I tried this code but it didn't work :( What is wrong with this?

 function custom_node_submit() {
 global $user;
 if (in_array('administrator', $user->roles)) {
  $form_state['values']['commerce_node_checkout_skip'] = True;
      }

}
pinkonomy’s picture

I finally solved this:

function custom_node_submit($node, $form, &$form_state) {
 global $user;

 if (in_array('administrator', $user->roles)) {
  $form_state['values']['commerce_node_checkout_skip'] = True;
  $node->status = 1;
    }

return $form;

 }