One solution I can see would be to merge automatically the CSV from HikaShop and the CSV from your database. There are tools for that you can find online:
www.google.com/search?ix=seb&sourceid=ch...e=UTF-8&q=csv+merger
Another solution would be for you to try to remove the code
if(empty($product->product_type)){
if(empty($product->product_parent_id)){
$product->product_type='main';
}else{
if(!empty($product->product_parent_id) && !empty($product->product_code) && $product->product_parent_id == $product->product_code){
$app =& JFactory::getApplication();
$app->enqueueMessage('The product '.$product->product_code.' has the same value in the product_parent_id and product_code fields which is not possible ( a main product cannot be a variant at the same time ). This product has been considered as a main product by HikaShop and has been imported as such.');
$product->product_type='main';
$product->product_parent_id=0;
}else{
$product->product_type='variant';
}
}
}else{
if(!in_array($product->product_type,array('main','variant'))){
$product->product_type = 'main';
}
}
if($product->product_type=='main'){
if(!empty($product->product_parent_id)){
$app =& JFactory::getApplication();
$app->enqueueMessage('The product '.@$product->product_code.' should have an empty value instead of the value '.$product->product_parent_id.' in the field product_parent_id as it is a main product (not a variant) and thus doesn\'t have any parent.','error');
}
}
and change the code :
$this->_insertOneTypeOfProducts($products,'main');
by:
$this->_insertOneTypeOfProducts($products,'');
in the file administrator/components/com_hikashop/helpers/import.php
That should avoid the problem.