本文整理匯總了PHP中categories::edit_cross_sell方法的典型用法代碼示例。如果您正苦於以下問題:PHP categories::edit_cross_sell方法的具體用法?PHP categories::edit_cross_sell怎麽用?PHP categories::edit_cross_sell使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類categories
的用法示例。
在下文中一共展示了categories::edit_cross_sell方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: foreach
//EOB setsflag
//EOB setsflag
case 'update_category':
$catfunc->insert_category($_POST, '', 'update');
break;
case 'insert_category':
$catfunc->insert_category($_POST, $current_category_id);
break;
case 'update_product':
$catfunc->insert_product($_POST, $current_category_id, 'update');
break;
case 'insert_product':
$catfunc->insert_product($_POST, $current_category_id);
break;
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]);
}
示例2: foreach
//EOB setsflag
//EOB setsflag
case 'update_category':
$catfunc->insert_category($_POST, '', $link, 'update');
break;
case 'insert_category':
$catfunc->insert_category($_POST, $current_category_id, $link);
break;
case 'update_product':
$catfunc->insert_product($_POST, '', $link, 'update');
break;
case 'insert_product':
$catfunc->insert_product($_POST, $current_category_id, $link);
break;
case 'edit_crossselling':
$catfunc->edit_cross_sell($_GET, $link);
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]);
}