本文整理汇总了PHP中categories::delete_product方法的典型用法代码示例。如果您正苦于以下问题:PHP categories::delete_product方法的具体用法?PHP categories::delete_product怎么用?PHP categories::delete_product使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类categories
的用法示例。
在下文中一共展示了categories::delete_product方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
case 'edit_crossselling':
$catfunc->edit_cross_sell($_GET);
break;
case 'multi_action_confirm':
// --- MULTI DELETE ---
if (isset($_POST['multi_delete_confirm'])) {
//delete multi_categories
if (is_array($_POST['multi_categories'])) {
foreach ($_POST['multi_categories'] as $category_id) {
$catfunc->remove_categories($category_id);
}
}
//delete multi_products
if (is_array($_POST['multi_products']) && is_array($_POST['multi_products_categories'])) {
foreach ($_POST['multi_products'] as $product_id) {
$catfunc->delete_product($product_id, $_POST['multi_products_categories'][$product_id]);
}
}
}
// --- MULTI DELETE ENDS ---
// --- MULTI MOVE ---
if (isset($_POST['multi_move_confirm'])) {
//move multi_categories
if (is_array($_POST['multi_categories']) && vam_not_null($_POST['move_to_category_id'])) {
foreach ($_POST['multi_categories'] as $category_id) {
$dest_category_id = vam_db_prepare_input($_POST['move_to_category_id']);
if ($category_id != $dest_category_id) {
$catfunc->move_category($category_id, $dest_category_id);
}
}
}