getRow('
SELECT ecc.`id_ebay_category`, ec.`id_category_ref`, ec.`id_category_ref_parent`, ec.`level`
FROM `'._DB_PREFIX_.'ebay_category_configuration` ecc
LEFT JOIN `'._DB_PREFIX_.'ebay_category` ec ON (ec.`id_ebay_category` = ecc.`id_ebay_category`)
WHERE ecc.`id_category` = '.(int)$_GET['id_category']);
$_GET['level'] = $currentPath['level'];
$_GET['level'.($currentPath['level'])] = $currentPath['id_ebay_category'];
for ($levelStart = $currentPath['level']; $levelStart > 1; $levelStart--)
{
$currentPath = Db::getInstance()->getRow('
SELECT ec.`id_ebay_category`, ec.`id_category_ref`, ec.`id_category_ref_parent`, ec.`level`
FROM `'._DB_PREFIX_.'ebay_category` ec
LEFT JOIN `'._DB_PREFIX_.'ebay_category_configuration` ecc ON (ecc.`id_ebay_category` = ec.`id_ebay_category`)
WHERE ec.`id_category_ref` = '.(int)$currentPath['id_category_ref_parent']);
$_GET['level'.($levelStart - 1)] = $currentPath['id_ebay_category'];
}
$levelExists = array();
for ($i = 0; $i <= 5; $i++)
if ($_GET['level'] >= $i)
{
if ($i == 0)
$eBayCategoryListLevel = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'ebay_category` WHERE `level` = 1 AND `id_category_ref` = `id_category_ref_parent`');
else
$eBayCategoryListLevel = Db::getInstance()->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'ebay_category` WHERE `level` = '.(int)($i + 1).' AND `id_category_ref_parent` IN (SELECT `id_category_ref` FROM `'._DB_PREFIX_.'ebay_category` WHERE `id_ebay_category` = '.(int)($_GET['level'.$i]).')');
if ($eBayCategoryListLevel)
{
$levelExists[$i + 1] = true;
echo ' ';
}
}
if (!isset($levelExists[$_GET['level'] + 1]))
echo '';
}
else
echo 'ERROR';