/**
*
* @param string $oIdS - order IDs separated by comma
* @return array
*
* Get all total items by selected order Ids
* e.g. Order 1 -> total 1 (netto), total 2 (vat), total 3(brutton), etc.
*/
public static function getItemsTotal($oIdS = '')
{
$db = Factory::getDBO();
$wheres = array();
if ($oIdS != '') {
$wheres[] = 'a.order_id IN (' . $oIdS . ')';
}
$query = 'SELECT a.id, a.order_id, a.item_id, a.item_id_c, a.item_id_r, a.title, a.title_lang, a.title_lang_suffix, a.title_lang_suffix, a.type, a.amount, a.amount_currency' . ' FROM #__phocacart_order_total AS a';
if (!empty($wheres)) {
$query .= ' WHERE ' . implode(' AND ', $wheres);
}
$db->setQuery($query);
$items = $db->loadAssocList();
return $items;
}