0

I'm using Drupal 7 with Entity Registration, Commerce and Registration Commerce to connect those two modules.

I have an issue concerning registration : if a reservation is canceled, the one on wait list should be placed on the user shopping cart automatically and a mail should be sent. I created the following basic rule :

{ "rules_available_reservation" : {
    "LABEL" : "Available reservation",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules", "commerce_cart", "registration" ],
    "ON" : { "registration_update" : [] },
    "IF" : [
      { "data_is" : { "data" : [ "registration:state" ], "value" : "complete" } }
    ],
    "DO" : [
      { "mail" : {
          "to" : [ "site:current-user:mail" ],
          "subject" : "Validate registration ",
          "message" : "My message",
          "language" : [ "" ]
        }
      },
      { "commerce_cart_product_add_by_sku" : {
          "USING" : {
            "user" : [ "site:current-user" ],
            "sku" : "registration:original",
            "quantity" : "1",
            "combine" : "1"
          },
          "PROVIDE" : { "product_add_line_item" : { "product_add_line_item" : "Added product line item" } }
        }
      }
    ]
  }
}

I obtain 2 error messages in the log...

  • Unable to evaluate action mail.
  • The variable or parameter to is empty.

Your Answer

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

Browse other questions tagged or ask your own question.