Добрый день.
Прошу помочь написать правило, которое бы выставляло наценку если пользователь выбрал способ оплаты PayPal.
Сделал вот такое правило, не срабатывает:
{ "rules__paypal" : {
"LABEL" : "\u041d\u0430\u0434\u0431\u0430\u0432\u043a\u0430 \u0437\u0430 PayPal",
"PLUGIN" : "reaction rule",
"WEIGHT" : "10",
"ACTIVE" : true,
"OWNER" : "rules",
"REQUIRES" : [ "commerce_payment", "commerce_line_item", "commerce_product_reference" ],
"ON" : { "commerce_product_calculate_sell_price" : [] },
"IF" : [
{ "commerce_payment_selected_payment_method" : {
"commerce_order" : [ "commerce-line-item:order" ],
"method_id" : "paypal_wps"
}
}
],
"DO" : [
{ "commerce_line_item_unit_price_add" : {
"commerce_line_item" : [ "commerce_line_item" ],
"amount" : "200",
"component_name" : "tax|_paypal",
"round_mode" : "1"
}
}
]
}
}
"LABEL" : "\u041d\u0430\u0434\u0431\u0430\u0432\u043a\u0430 \u0437\u0430 PayPal",
"PLUGIN" : "reaction rule",
"WEIGHT" : "10",
"ACTIVE" : true,
"OWNER" : "rules",
"REQUIRES" : [ "commerce_payment", "commerce_line_item", "commerce_product_reference" ],
"ON" : { "commerce_product_calculate_sell_price" : [] },
"IF" : [
{ "commerce_payment_selected_payment_method" : {
"commerce_order" : [ "commerce-line-item:order" ],
"method_id" : "paypal_wps"
}
}
],
"DO" : [
{ "commerce_line_item_unit_price_add" : {
"commerce_line_item" : [ "commerce_line_item" ],
"amount" : "200",
"component_name" : "tax|_paypal",
"round_mode" : "1"
}
}
]
}
}