当前位置: 首页>>代码示例>>PHP>>正文


PHP zen_copy_products_attributes函数代码示例

本文整理汇总了PHP中zen_copy_products_attributes函数的典型用法代码示例。如果您正苦于以下问题:PHP zen_copy_products_attributes函数的具体用法?PHP zen_copy_products_attributes怎么用?PHP zen_copy_products_attributes使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了zen_copy_products_attributes函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: zen_copy_products_attributes

     $copy_attributes_duplicates_skipped = $_POST['copy_attributes'] == 'copy_attributes_ignore' ? '1' : '0';
     $copy_attributes_duplicates_overwrite = $_POST['copy_attributes'] == 'copy_attributes_update' ? '1' : '0';
     zen_copy_products_attributes($_POST['products_id'], $_POST['products_update_id']);
     //      die('I would copy Product ID#' . $_POST['products_id'] . ' to a Product ID#' . $_POST['products_update_id'] . ' - Existing attributes ' . $_POST['copy_attributes']);
     $_GET['action'] = '';
     zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $_GET['products_id'] . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')));
     break;
     // attributes copy to category
 // attributes copy to category
 case 'update_attributes_copy_to_category':
     $copy_attributes_delete_first = $_POST['copy_attributes'] == 'copy_attributes_delete' ? '1' : '0';
     $copy_attributes_duplicates_skipped = $_POST['copy_attributes'] == 'copy_attributes_ignore' ? '1' : '0';
     $copy_attributes_duplicates_overwrite = $_POST['copy_attributes'] == 'copy_attributes_update' ? '1' : '0';
     $copy_to_category = $db->Execute("select products_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id='" . $_POST['categories_update_id'] . "'");
     while (!$copy_to_category->EOF) {
         zen_copy_products_attributes($_POST['products_id'], $copy_to_category->fields['products_id']);
         $copy_to_category->MoveNext();
     }
     //      die('CATEGORIES - I would copy Product ID#' . $_POST['products_id'] . ' to a Category ID#' . $_POST['categories_update_id']  . ' - Existing attributes ' . $_POST['copy_attributes'] . ' Total Products ' . $copy_to_category->RecordCount());
     $_GET['action'] = '';
     zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $_GET['products_id'] . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')));
     break;
 case 'new_product':
     if (isset($_GET['product_type'])) {
         // see if this category is restricted
         $pieces = explode('_', $_GET['cPath']);
         $cat_id = $pieces[sizeof($pieces) - 1];
         //	echo $cat_id;
         $sql = "select product_type_id from " . TABLE_PRODUCT_TYPES_TO_CATEGORY . " where category_id = '" . $cat_id . "'";
         $product_type_list = $db->Execute($sql);
         $sql = "select product_type_id from " . TABLE_PRODUCT_TYPES_TO_CATEGORY . " where category_id = '" . $cat_id . "' and product_type_id = '" . $_GET['product_type'] . "'";
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:31,代码来源:categories.php

示例2: zen_copy_products_attributes

        /////////////////////////////////////////////////////////////////////////////////////////////
        // Copy attributes to duplicate product
        // moved above            $products_id_from=zen_db_input($products_id);
        $products_id_to = $dup_products_id;
        $products_id = $dup_products_id;
        if ($_POST['copy_attributes'] == 'copy_attributes_yes' and $_POST['copy_as'] == 'duplicate') {
            // $products_id_to= $copy_to_products_id;
            // $products_id_from = $pID;
            //            $copy_attributes_delete_first='1';
            //            $copy_attributes_duplicates_skipped='1';
            //            $copy_attributes_duplicates_overwrite='0';
            if (DOWNLOAD_ENABLED == 'true') {
                $copy_attributes_include_downloads = '1';
                $copy_attributes_include_filename = '1';
            } else {
                $copy_attributes_include_downloads = '0';
                $copy_attributes_include_filename = '0';
            }
            zen_copy_products_attributes($products_id_from, $products_id_to);
        }
        // EOF: Attributes Copy on non-linked
        /////////////////////////////////////////////////////////////////////
        // copy product discounts to duplicate
        if ($_POST['copy_discounts'] == 'copy_discounts_yes') {
            zen_copy_discounts_to_product($old_products_id, (int) $dup_products_id);
        }
    }
    // reset products_price_sorter for searches etc.
    zen_update_products_price_sorter($products_id);
}
zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $categories_id . '&pID=' . $products_id . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')));
开发者ID:ZenMagick,项目名称:zc-base,代码行数:31,代码来源:copy_to_confirm.php


注:本文中的zen_copy_products_attributes函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。