I am trying to create a rule that will award userpoints to user when his product is purchased.
Here's my test rule (without any useful functional):

{ "rules_award_seller_cloned_" : {
    "LABEL" : "Award seller (cloned)",
    "PLUGIN" : "reaction rule",
    "WEIGHT" : "5",
    "REQUIRES" : [ "uc_payment", "rules" ],
    "ON" : [ "uc_payment_entered" ],
    "IF" : [
      { "uc_payment_condition_order_balance" : { "order" : [ "order" ], "balance_comparison" : "less_equal" } }
    ],
    "DO" : [
      { "LOOP" : {
          "USING" : { "list" : [ "order:products" ] },
          "DO" : [
            { "drupal_message" : { "message" : "[list_item:title] [list_item:price]" } }
          ]
        }
      }
    ]
  }
}

I am getting the following error when adding payment to the order:

Fatal error: Call to undefined function uc_order_get_properties() in /home/magicfoc/domains/magicfocus.ru/public_html/sites/all/modules/entity/includes/entity.wrapper.inc on line 421

If I remove loop and message in rule actions, all is OK.

CommentFileSizeAuthor
#1 1178746-uc_order-products-entity.patch606 byteslongwave

Comments

longwave’s picture

Status: Active » Needs review
StatusFileSize
new606 bytes

Simply removing the getter/setter callback seems to fix it, let me know if this works as expected.

Status: Needs review » Needs work

The last submitted patch, 1178746-uc_order-products-entity.patch, failed testing.

longwave’s picture

Version: 7.x-3.0-beta3 » 7.x-3.x-dev
Status: Needs work » Needs review
longwave’s picture

Status: Needs review » Fixed

Committed.

Automatically closed -- issue fixed for 2 weeks with no activity.