Hello,
I'm trying to delete a big amount of products and to do that I thought to upload the product
codes to a custom table named "custom_products_to_delete" and then use the fn_delete_product
function to perform the deletion.
This is what I did:
I have added these lines of code in products.php
\app\controllers\backend\products.php
if($mode == "deleteobsolete")
{
$a = db_get_array("SELECT product_id FROM cscart_products,custom_products_to_delete WHERE custom_products_to_delete.product_code =cscart_products.product_code");
foreach($a as $v)
{
fn_delete_product($v['product_id']);
}
}
and then I have created an empty deleteobsolete.tpl file
\design\backend\templates\views\products\deleteobsolete.tpl
but When I call /admin.php?dispatch=products.deleteobsolete nothing happens. I don't receive any errors but the products are not being deleted.