I created a field field_cel_ck_scholar. It's a boolean. I created this field in a customer profile type. My customer profile type is added in a pane in my checkout.

When this field is equal TRUE, I want by pass the checkout/%/payment's page and to redirect the checkout/%/complete's page.

It's possible ?

I try to use Rules like so:

{ "rules_by_pass" : {
"LABEL" : "by pass",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "rules", "commerce_checkout", "commerce_rules_extra" ],
"ON" : { "commerce_rules_extra_process_checkout_page" : [] },
"IF" : [
  { "entity_has_field" : {
      "entity" : [ "site:current-cart-order" ],
      "field" : "field_cel_ck_scholar"
"DO" : [
  { "commerce_checkout_complete" : { "commerce_order" : [ "site:current-cart-order" ] } }

It doesn't work, why?


Seems like you're trying to create a Rules condition like so:

if field field_cel_ck_scholar=TRUE

whereas you have such field added in your 'customer profile type'.

Looking at the rule you create so far, your Rules condition seems incomplete:

  • you already do have the entity_has_field, that's OK, and actually one (out of 2) ways to be able to create such condition like "if field field_cel_ck_scholar=TRUE".
  • your Rules condition seems to be missing the actual Data comparison condition, in which you actually specify that "if field field_cel_ck_scholar=TRUE".

So try adding such Data Comparison condition, and check if that solves your issue. Not sure if it will be the only reason why "It doesn't work", but for sure a reason why it cannot work.

PS: refer to my answer to the question about How to specify a Rules condition related to select list values? for a similar (though not duplicate) question, which includes some more details (and background info) about such entity_has_field.

  • Thank you for accept! Was it the "only" reason why it didn't work? – Pierre.Vriens Oct 9 '15 at 14:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.