2
Answers
What function load products array by term id(programmatically)?
Sorry for my english.
I seek at http://api.drupalcommerce.org/ but it too hard for me
Sorry for my english.
I seek at http://api.drupalcommerce.org/ but it too hard for me
$query = new EntityFieldQuery();
$query->entityCondition('entity_type', 'node')
->entityCondition('bundle', 'product_display')
->propertyCondition('status', 1)
->fieldCondition('field_TERM', 'tid', $tid, '=')
$result = $query->execute();
You can then feed the ids from that result into commerce_load_multiple using something like:
array_keys($result['node'])
thank you very much. But may be exist something like "super_function($tid)", which return "array_keys($result['node'])"?