根據產品的訪問方式,fx通過訂單,規則缺陷/缺陷可能會阻止您,請參閱d.o上的issue。
有一個解決方法,通過使用hook_entity_property_info_alter
來解決此問題。像這樣的東西應該爲你做的伎倆:
/**
* Implements hook_entity_property_info_alter() on top of the Line Item module.
*/
function module_entity_property_info_alter(&$info) {
// Add custom discount fields to circumvent a rules bug.
$properties = array();
foreach ($info['commerce_product']['bundles'] as $bundle => $bundle_info) {
$bundle_info += array('properties' => array());
$properties += $bundle_info['properties'];
}
$info['commerce_product']['properties']['field_NAME'] = $properties['field_NAME'];
}