當前位置: 首頁>>代碼示例>>PHP>>正文


PHP categories::link_product方法代碼示例

本文整理匯總了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');
             }
開發者ID:nomadcomanche,項目名稱:zdorov_shop,代碼行數:31,代碼來源:categories.php

示例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
開發者ID:shophelfer,項目名稱:shophelfer.com-shop,代碼行數:31,代碼來源:categories.php


注:本文中的categories::link_product方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。