本文整理汇总了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