function globallink_commerce_get_sent_rows_by_pid in GlobalLink Connect for Drupal 7.7
Gets sent commerce product rows by product ID.
Parameters
string $pid: The commerce product ID.
Return value
array Array of commerce product rows.
1 call to globallink_commerce_get_sent_rows_by_pid()
- globallink_commerce_send_for_translations in globallink_commerce/
globallink_commerce.inc - Sends commerce for translation.
File
- globallink_commerce/
globallink_commerce.inc, line 217
Code
function globallink_commerce_get_sent_rows_by_pid($pid) {
$result = db_select('globallink_document', 'tc')
->fields('tc')
->condition('object_id', $pid, '=')
->condition('entity_type', GLOBALLINK_ENTITY_TYPE_COM, '=')
->condition('target_status', array(
GLOBALLINK_STATUS_TRANSLATION_SENT,
GLOBALLINK_STATUS_TRANSLATION_ERROR,
GLOBALLINK_STATUS_TRANSLATION_COMPLETED,
), 'IN')
->execute();
$rows = array();
foreach ($result as $row) {
$rows[] = $row;
}
return $rows;
}