I have the import feature working nicely in the products module, however, when I select the 'Overwrite' option of the 'How to handle duplicate products?' section, I notice that products are deleted from the database first, then overwritten.
Below is the code (starting from line 422) of class.csv_importer.php in the products module
Code: Select all
// uh-oh, it's a duplicate product.
if( $this->_getPolicyValue('skip_existing_products') )
{
// woohoo, we get to skip this whole line
$this->_setError("duplicate product $name");
}
else
{
// uh-oh we gotta delete this existing product first.
$this->_module->DeleteProduct($t_id);
}
}
Can anyone offer any suggestions to fix this? When I say to 'overwrite' a duplicate product, I would like it to update a value/row in a table, not delete and re-insert.
When a product is deleted and re-inserted, its URL changes. So if someone bookmarks the product at this url, then U update the product, it will no longer appear at that url (for example below)
www.yoursite.com/products/42/41/bn11110028 (<----- last number is product code/name in my case)