1

I tried Rules like explained here enter link description here. It works but when it comes to checkout, order total amount displays 0. I've got no clue why. Here is my rule:

{ "rules_sale_price" : {
    "LABEL" : "\u0426\u0435\u043d\u0430 \u0441\u043e \u0441\u043a\u0438\u0434\u043a\u043e\u0439",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "TAGS" : [ "sale price" ],
    "REQUIRES" : [ "rules", "commerce_product_reference" ],
    "ON" : { "commerce_product_calculate_sell_price" : [] },
    "IF" : [
      { "entity_has_field" : { "entity" : [ "commerce-line-item" ], "field" : "commerce_product" } },
      { "entity_has_field" : {
          "entity" : [ "commerce-line-item:commerce-product" ],
          "field" : "field_produkt_sale_price"
        }
      },
      { "NOT data_is_empty" : { "data" : [ "commerce-line-item:commerce-product:field-produkt-sale-price" ] } }
    ],
    "DO" : [
      { "data_set" : {
          "data" : [ "commerce-line-item:commerce-unit-price" ],
          "value" : [ "commerce-line-item:commerce-product:field-produkt-sale-price" ]
        }
      }
    ]
  }
} 

1 Answer 1

1

I found the right way to do this: In the rule action I used Set the unit price to a specific amount instead of Set a data value.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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