When inside of bigcommerce category manager, if I attempt to delete a category that contains products, I am prompted to relocate all affected products.
I am using PHP and standard auth to communicate with the bigcommerce api. I have a script that will delete a category from bigcommerce when that category is empty, but it fails with no status codes or errors, if that category contains products.
Is there supposed to be any return/response/status code for this occurrence?
here is my delete code:
Bigcommerce_Api::failOnError();
try {
$delCategory = BigCommerce_Api::deleteCategory($curCatid);
} catch(Bigcommerce_Api_Error $error) {
$e1=$error->getCode();
$e2=$error->getMessage();
echo $e1.'<br>';
echo $e2.'<br>';
}
Thanks in advance for any useful assistance.