Hi,
The export only add the category name in the categories column. The system doesn't need to have the parent category mentioned there usually and it would even be a problem when the product is assigned to different categories from different parent categories.
That's why the parent_category column is blank.
Change the code:
$data[] = '';
if(!empty($categories))
$data[] = implode($separator,$categories);
else
$data[] = '';
to:
if(!empty($categories)){
if(count($categories)>1){
$data[] = '';
}else{
$parent_id = $categories[0]->category_parent_id;
$data[] = str_replace(array('"',',',';'), array('""','\\,','\\;'), $this->categories[$parent_id]->category_name);
}
$data[] = implode($separator,$categories);
}else{
$data[] = '';
$data[] = '';
}
in the "export" file of the view "product" and it will set the parent_category of the products.