Ciao a tutti,
ho la necessità di recuperare il percorso delle categorie un un e-commerce opencart.
Ho creato una funzione che dovrebbe "tirare fuori" proprio l'elenco delle categorie.
Purtroppo invece non funziona 
Ecco la funzione:
Codice PHP:
function getCat($child){
$get_data2 = "SELECT " . DB_PREFIX . "category_description.name, " . DB_PREFIX . "category.parent_id FROM " . DB_PREFIX . "category INNER JOIN " . DB_PREFIX . "category_description ON (" . DB_PREFIX . "category.category_id = " . DB_PREFIX . "category_description.category_id) WHERE " . DB_PREFIX . "category_description.language_id = 2 AND " . DB_PREFIX . "category.category_id = " . $child;
//print $get_data2;
//exit;
$result2 = mysql_query($get_data2, $conn);
$row2 = mysql_fetch_array($result2);
$cat[] = $row2["name"];
if($row2["parent_id"] > 0){
getCat($row2["parent_id"]);
}
return implode("#", krsort($cat));
}
Any help?