本文整理匯總了PHP中design::retrieveProducts方法的典型用法代碼示例。如果您正苦於以下問題:PHP design::retrieveProducts方法的具體用法?PHP design::retrieveProducts怎麽用?PHP design::retrieveProducts使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類design
的用法示例。
在下文中一共展示了design::retrieveProducts方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
$eao = 2;
//element adjust order
use_class('design');
use_class('elements_preorder');
use_class('elements_order');
use_class('elements_stock');
use_class('products_articles');
use_class('products_minierp');
$class_es = new elements_stock();
$class_pm = new products_minierp();
$class_pa = new products_articles();
$ean_eu_collection = array();
$max_el_per_article = 0;
$use_elements = array();
$class_d = new design($_GET['d']);
$products = $class_d->retrieveProducts();
foreach ($products as $p) {
$query_products_categories = "SELECT * FROM products_to_categories ptc WHERE products_id={$p['products_id']}";
$tpdbq_products_categories = tep_db_query($query_products_categories);
$products_categories = tep_db_fetch_array($tpdbq_products_categories);
// find what use element in this product
$ean_eu_collection[$p['products_id'] . '-0'] = '';
$tpdbq_products_use_elements = $class_pm->retrieveElementsUsage($p[products_id]);
foreach ($tpdbq_products_use_elements as $row_pue) {
$use_elements[] = array('elements_id' => $row_pue['elements_id'], 'quantity' => (int) $row_pue['quantity'] * $eao);
$ean_eu_collection[$p['products_id'] . '-0'] .= $row_pue['elements_id'] . ' x ' . $row_pue['quantity'] . '|';
}
$mepa = count($tpdbq_products_use_elements);
if ($mepa > $max_el_per_article) {
$max_el_per_article = $mepa;
}
示例2: productLinkWithID
// }
// $product = productLinkManageElementsUsed($products_id, $product_name);
$product = productLinkWithID($products_id, $product_name, '&designs_id=' . $designs_id);
$result = array();
$result['product'] = $product;
$result['designs_id'] = $draft->designs_id;
$result['drafts_id'] = $draft->id;
$result['products_id'] = $products_id;
ajaxReturn($result);
exit;
} elseif ($_POST['me_action'] == 'DELETEPRODUCT') {
$products_id = tep_db_prepare_input($_POST['products_id']);
$draft = new design_draft(null, $products_id);
$draft->deleteProduct($products_id, $session_userinfo['username']);
$design = new design($draft->designs_id);
$products = $design->retrieveProducts();
// $need_load_row_design = (count($products)>0) ? false : true;
$result = array();
$result['products_id'] = $products_id;
$result['designs_id'] = $design->id;
$result['drafts_id'] = $draft->id;
$result['status'] = 'DELETED';
// $result['load_row_design'] = $need_load_row_design;
ajaxReturn($result);
exit;
} elseif ($_POST['me_action'] == 'DELETEELEMENT') {
$elements_id = tep_db_prepare_input($_POST['elements_id']);
$new_status = tep_db_prepare_input($_POST['new_status']);
$draft = new design_draft(null, null, $elements_id);
$draft->deleteElement($elements_id, $session_userinfo['username']);
$st_counter = '';