本文整理汇总了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'] . "'";
示例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'] : '')));