Index: class.tx_commerce_db_category.php =================================================================== --- class.tx_commerce_db_category.php (revision 53297) +++ class.tx_commerce_db_category.php (working copy) @@ -222,6 +222,20 @@ // @TODO Access check for data sets $data[] = (int)$return_data['uid_local']; } + if(is_array($data)) { + if($GLOBALS['TSFE']->sys_language_uid > 0){ + foreach ($data as $k => $v) { + $results = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('title', 'tx_commerce_categories', 'l18n_parent =' . $v .' AND sys_language_uid = ' .$GLOBALS['TSFE']->sys_language_uid . + ' AND hidden = 0 AND deleted = 0'); + $tempCats[$v] = $results[0]['title']; + } + asort($tempCats); + $data = array(); + foreach($tempCats as $key => $value) { + $data[] = $key; + } + } + } $GLOBALS['TYPO3_DB']->sql_free_result($result); return $data; } @@ -305,6 +319,24 @@ $data = $hookObj->productQueryPostHook($data, $this); } } + if (is_array($data) && !empty($data)) { + if ($GLOBALS['TSFE']->sys_language_uid > 0) { + $wherePart = 'l18n_parent in (%1$s) AND sys_language_uid = ' . $GLOBALS['TSFE']->sys_language_uid; + } else { + $wherePart = 'uid in (%1$s)'; + } + $uids = implode(',',array_values($data)); + $tempProducts = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows( + 'uid, title', + 'tx_commerce_products', + sprintf($wherePart, t3lib_DB::cleanIntList($uids)) . ' AND hidden = 0 AND deleted = 0', + '', + 'title', + '', + 'uid' + ); + $data = array_keys($tempProducts); + } return $data; } return FALSE;