本文整理汇总了PHP中products_minierp::isBestProduct方法的典型用法代码示例。如果您正苦于以下问题:PHP products_minierp::isBestProduct方法的具体用法?PHP products_minierp::isBestProduct怎么用?PHP products_minierp::isBestProduct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类products_minierp
的用法示例。
在下文中一共展示了products_minierp::isBestProduct方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: AND
$sendback_id = $_POST['sendback_id'];
$products_id = $_POST['products_id'];
$ean_no = $_POST['ean'];
$type = $_POST['type'];
$qty_sent = $_POST['qty_sent'];
if ($mode == 'rcv_different_product') {
$package_contents = $class_sendback->retrievePackageContentList($package_id, "s.products_ean='{$ean_no}' AND s.type='{$type}' AND s.status='18' AND (s.quantity_stock=0 AND s.quantity_actual=0)");
$products_ean = $class_pean->getProductArticle($ean_no);
$products_id = $products_ean['products_id'];
$qty_rcv = count($package_contents) > 0 ? $package_contents[0]['quantity_received'] : 0;
$qty_sent = '0';
} else {
$qty_rcv = $_POST['qty_rcv'];
}
$qty_rcv++;
$is_best_product = $class_pm->isBestProduct($products_id);
if ($is_best_product) {
$received_status = '';
$post_result .= '<div style="background:#E4E3E0;width:500px;padding:20px;">';
$post_result .= '<table border="0" cellpadding="0" cellspacing="0">';
$post_result .= '<tr><td align="center" colspan="2" style="vertical-align:middle"><h1>Please Do Product Quality Check</h1></td></tr>';
$post_result .= '<tr>';
$post_result .= '<td align="center" style="vertical-align:middle"><input type="button" style="width:120px;height:70px;font-size:20px;" class="qcproduct green bold" value="QC OK" title="Put To \'Bin In HH\' Box"/></td>';
$post_result .= '<td align="center" style="vertical-align:middle"><input type="button" style="width:120px;height:70px;font-size:20px;" class="qcproduct red bold" value="QC BAD" title="Put To \'Need Service\' Box" /></td>';
$post_result .= '</tr>';
$post_result .= '<tr><td align="center" colspan="2"> </td></tr>';
$post_result .= '<tr><td align="center" colspan="2" style="vertical-align:middle"><h1>Or</h1></td></tr>';
$post_result .= '<tr><td align="center" colspan="2" style="vertical-align:middle"><input type="button" style="font-size:20px;" class="qcdis red bold" value="Disassembled" title="Put To \'Disassembled\' Box" /></td></tr>';
$post_result .= '</table>';
$post_result .= '</div>';
} else {
示例2: ajaxReturn
$ajaxResult['result'] = $post_result;
ajaxReturn($ajaxResult);
exit;
}
}
if (isset($_GET) && count($_GET) > 0) {
$ean_no = $_GET['ean'];
$pa = $class_pean->getProductArticle($ean_no);
$products_id = $pa['products_id'];
if ($products_id != '') {
$qp = "SELECT p.*, pd.products_name FROM products p INNER JOIN products_description pd ON p.products_id = pd.products_id\n WHERE p.products_id = {$products_id} AND pd.language_id = 2";
$dbqp = tep_db_query($qp);
$rp = tep_db_fetch_array($dbqp);
$p_img = webImage($rp['products_image'], '350', '350', 'Products ' . $ean_no, 'ui-corner-all');
$p_length = $pa['length'] > 0 ? ' / ' . textLength($pa['length']) : '';
$is_best_product = $class_pm->isBestProduct($pa['products_id']);
if ($is_best_product) {
$used_form = '<table style="width:100%;position:absolute;top:0;left:0;" border="0" cellpadding="0" cellspacing="0">';
$used_form .= '<tr><td align="center" colspan="2">' . $p_img . '</td></tr>';
$used_form .= '<tr><td align="center" colspan="2" style="font-size:16px;font-weight:bold;">' . $rp['products_model'] . $p_length . '</td></tr>';
$used_form .= '<tr><td align="center" colspan="2" style="padding:9px;"><span class="bold" style="vertical-align:middle;font-size:34px;">Please Do Product Quality Check</span></td></tr>';
$used_form .= '<tr>';
$used_form .= '<input type="hidden" id="hid-ids" value="' . $pa['products_id'] . '-' . $pa['products_articles_id'] . '"/>';
$used_form .= '<td align="center"><input type="button" style="font-size:15px;" class="qcok green button" value="QC OK"/></td>';
$used_form .= '<td align="center"><input type="button" style="font-size:15px;" class="qcbad red button" value="QC BAD"/></td>';
$used_form .= '</tr>';
$used_form .= '</table>';
} else {
$used_form .= '<table style="background:#ff0000;width:100%;height:100%;position:absolute;top:0;left:0;" border="0" cellpadding="0" cellspacing="0">';
$used_form .= '<tr><td align="center">' . $p_img . '</td></tr>';
$used_form .= '<tr><td align="center"><h1>' . $rp['products_model'] . $p_length . '</h1></td></tr>';
示例3: processReturnOld
function processReturnOld($sp_type, $order_id, $ean_code, $reason = '0')
{
global $class_jo;
global $class_o;
use_class('payone');
use_class('products_minierp');
$class_payone = new payone();
$class_pm = new products_minierp();
$return_allowed_status = array('9', '11', '16', '20');
$is_best_product = '';
$order_product_id = '';
$product_barcode = '';
$status = 'RETURNNOTALLOWED';
if (strtolower($sp_type) == 's') {
$items = $class_jo->retrieveItems($order_id);
foreach ($items as $key => $item) {
$items_id = $item['jng_sp_orders_items_id'];
$product_code = $item['products_model'];
$product_name = $item['products_name'];
// echo $item['products_ean']." | ".$item['status']."<br/>";
if ($item['products_ean'] == $ean_code && in_array($item['status'], $return_allowed_status)) {
$products_id = $item['products_id'];
// if($reason=='') {
// $order_product_id = $items_id;
// $status = 'MCSCANREASON';
// $reasons = $class_jo->returnReasonList();
// $reasons_list = array();
// foreach($reasons as $reason_id=>$val){
// $reasons_list[] = $reason_id."-".$val;
// }
// $result['reasons'] = $reasons_list;
// }else{
$returnable = $item['order_quantity'];
$return_data = $class_jo->retrieveReturnItem($items_id);
// echo "<pre>";var_dump($return_data);
if (!is_null($return_data)) {
foreach ($return_data as $rd) {
$returnable -= $rd['return_quantity'];
}
}
if ($returnable > 0) {
$order_product_id = $items_id;
$product_barcode = "SP-{$order_product_id}";
$is_best_product = $class_pm->isBestProduct($item['products_id']);
$status = $is_best_product ? 'MCBINORRETURN' : 'MCRETURNTOBALI';
//CREATE RETURN
$return_date = date('Y-m-d H:i:s');
$return_qty = 1;
$comment_customer = '';
$comment_jng = '';
$shipping_paid = tep_db_prepare_input($_POST['shipping_paid']);
$return_id = $class_jo->returnItem($items_id, $return_date, $return_qty, $reason, $comment_customer, $comment_jng, $shipping_paid);
//CREATE PAYONE RETURN
// $return_id = '123';
if ($return_id != '') {
$class_payone->createReturnContainerSP($return_id, $return_qty, $items_id);
$items_q = tep_db_query("SELECT SUM(order_quantity) AS total FROM jng_sp_orders_items WHERE jng_sp_orders_id={$order_id} AND status NOT IN (10, 12)");
$items = tep_db_fetch_array($items_q);
$items_total = $items['total'];
$returns_total = getTotalReturnOrderSP($order_id);
$returnable = $items_total - $returns_total;
}
}
// } //BLOCK reason status
}
}
} elseif (strtolower($sp_type) == 'j') {
use_class('products_ean');
$class_pean = new products_ean();
$items = $class_o->retrieveProducts($order_id);
foreach ($items as $key => $item) {
$ean = $class_pean->getEAN($item['products_id'], $item['products_articles_id']);
$opid = $item['orders_products_id'];
$product_code = $item['products_model'];
$product_name = $item['products_name'];
// echo $ean." | ".$item['status']."<br/>";
if ($ean == $ean_code && in_array($item['status'], $return_allowed_status)) {
$products_id = $item['products_id'];
$existing_return = $class_o->productReturnTotalQty($opid);
if ($existing_return < $item['products_quantity']) {
$order_product_id = $opid;
$product_barcode = "JG-{$order_product_id}";
$is_best_product = $class_pm->isBestProduct($item['products_id']);
$status = $is_best_product ? 'MCBINORRETURN' : 'MCRETURNTOBALI';
//CREATE RETURN
$opid = $item['orders_products_id'];
$return_date = date('Y-m-d H:i:s');
$return_qty = 1;
$return_type = 'C';
$return_status = '0';
$return_comment = '';
$product_received = 1;
$return_id = $class_o->addReturnProduct($opid, $return_date, $return_qty, $return_type, $return_status, $return_comment, $product_received);
//CREATE PAYONE RETURN
// $return_id = '123';
if ($return_id != '') {
$class_payone->createReturnContainer($return_id, $return_qty, $opid);
$items_q = tep_db_query("SELECT SUM(products_quantity) AS total FROM orders_products WHERE orders_id={$order_id} AND status NOT IN (10, 12)");
$items = tep_db_fetch_array($items_q);
$items_total = $items['total'];
//.........这里部分代码省略.........