本文整理匯總了PHP中categories::link_product方法的典型用法代碼示例。如果您正苦於以下問題:PHP categories::link_product方法的具體用法?PHP categories::link_product怎麽用?PHP categories::link_product使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類categories
的用法示例。
在下文中一共展示了categories::link_product方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: unset
} else {
$messageStack->add_session('Copy type not specified.', 'error');
}
}
}
unset($_SESSION['copied']);
}
//copy multi_products
if (is_array($_POST['multi_products']) && (is_array($_POST['dest_cat_ids']) || vam_not_null($_POST['dest_category_id']))) {
foreach ($_POST['multi_products'] as $product_id) {
$product_id = vam_db_prepare_input($product_id);
if (is_array($_POST['dest_cat_ids'])) {
foreach ($_POST['dest_cat_ids'] as $dest_category_id) {
$dest_category_id = vam_db_prepare_input($dest_category_id);
if ($_POST['copy_as'] == 'link') {
$catfunc->link_product($product_id, $dest_category_id);
} elseif ($_POST['copy_as'] == 'duplicate') {
$catfunc->duplicate_product($product_id, $dest_category_id);
} else {
$messageStack->add_session('Copy type not specified.', 'error');
}
}
} elseif (vam_not_null($_POST['dest_category_id'])) {
$dest_category_id = vam_db_prepare_input($_POST['dest_category_id']);
if ($_POST['copy_as'] == 'link') {
$catfunc->link_product($product_id, $dest_category_id);
} elseif ($_POST['copy_as'] == 'duplicate') {
$catfunc->duplicate_product($product_id, $dest_category_id);
} else {
$messageStack->add_session('Copy type not specified.', 'error');
}
示例2:
}
}
if ($_GET['pID']) {
xtc_redirect(xtc_href_link(FILENAME_CATEGORIES, 'cPath=' . $_GET['cPath'] . '&pID=' . $_GET['pID'] . $catfunc->page_parameter));
} else {
xtc_redirect(xtc_href_link(FILENAME_CATEGORIES, 'cPath=' . $_GET['cPath'] . '&cID=' . $_GET['cID'] . $catfunc->page_parameter));
}
break;
//EOB setpflag
//EOB setpflag
case 'setsflag':
if ($_GET['flag'] == '0' || $_GET['flag'] == '1') {
if ($_GET['pID']) {
$catfunc->set_product_startpage($_GET['pID'], $_GET['flag']);
if ($_GET['flag'] == '1') {
$catfunc->link_product($_GET['pID'], 0);
}
//BOF - Dokuman - 2009-11-12 - BUGFIX #0000351: When products disable display on startpage, should update table products_to_categories
$catfunc->set_product_remove_startpage_sql($_GET['pID'], $_GET['flag']);
//if ($_GET['flag'] == '0') xtc_redirect(xtc_href_link(FILENAME_CATEGORIES));
//EOF - Dokuman - 2009-11-12 - BUGFIX #0000351: When products disable display on startpage, should update table products_to_categories
}
}
if ($_GET['pID']) {
xtc_redirect(xtc_href_link(FILENAME_CATEGORIES, 'cPath=' . $_GET['cPath'] . '&pID=' . $_GET['pID'] . $catfunc->page_parameter));
} else {
xtc_redirect(xtc_href_link(FILENAME_CATEGORIES, 'cPath=' . $_GET['cPath'] . '&cID=' . $_GET['cID'] . $catfunc->page_parameter));
}
break;
//EOB setsflag
//EOB setsflag