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


PHP orders::retrieveProducts方法代码示例

本文整理汇总了PHP中orders::retrieveProducts方法的典型用法代码示例。如果您正苦于以下问题:PHP orders::retrieveProducts方法的具体用法?PHP orders::retrieveProducts怎么用?PHP orders::retrieveProducts使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在orders的用法示例。


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

示例1: array

$labelxpos = 1;
$labelypos = 1;
foreach ($orders_array as $order_id) {
    $order = array();
    if ($type == 'sp') {
        //RETRIEVED DATA SP
        $order_data = $class_jo->retrieveDetail($order_id);
        $items = $class_jo->retrieveItems($order_id);
        $order['customer'] = "{$order_data['customer_shipping_firstname']} {$order_data['customer_shipping_lastname']} ";
        $order['id'] = $order_data['order_id'];
        $order['shipment_id'] = $order_data['shipment_id'];
        $order['prefix_code'] = $sp_prefix[$order_data['jng_sp_id']];
    } else {
        //RETRIEVED DATA JNG
        $order_data = $class_o->retrieveDetail($order_id);
        $items = $class_o->retrieveProducts($order_id);
        $order['id'] = $order_data['orders_no'];
        $order['customer'] = $order_data['delivery_name'];
        $order['prefix_code'] = '';
    }
    if ($order_counter % $pdf->label_per_page == 0) {
        $pdf->AddPage();
    }
    $order_counter++;
    $xpos_starter = ($labelxpos - 1) * $pdf->label_width + $labelxpad;
    $ypos_starter = ($labelypos - 1) * $pdf->label_height + $labelypad;
    $logo_xpos = $xpos_starter + 52;
    $logo_ypos = $ypos_starter;
    $pdf->Image(FPDF_IMGPATH . 'jng-logo.png', $logo_xpos, $logo_ypos, 43, 5.33);
    //WxH 64.5 x 8
    $xpos = $xpos_starter;
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:package-labels.php

示例2: orders

require_once '../confy.php';
require_once '../functions.php';
require_once '../functions-2.php';
require_once DIR_WS_FUNCTIONS . 'html_output.php';
tep_db_connect();
use_class('orders');
$class_o = new orders();
use_class("minierp_invoices");
$class_mi = new minierp_invoices();
$package_id = 0;
//ORDERS_ID
$orders_id = '6460';
//ORDERS_PRODUCTS_ID (do not add canceled products)
$orders_products_id = array('11857');
$order_data = $class_o->retrieveDetail($orders_id);
$products_in_orders = $class_o->retrieveProducts($orders_id);
$products = array();
foreach ($products_in_orders as $key => $pio) {
    if (in_array($pio['orders_products_id'], $orders_products_id)) {
        $products[$key] = $pio;
    }
}
$totals = $class_o->retrieveTotals($orders_id);
if (is_array($order_data) && is_array($products) && is_array($totals)) {
    if (count($order_data) > 0 && count($products) > 0 && count($totals) > 0) {
        $existing_invoices = $class_mi->retrieveInvoicesByOrder($orders_id);
        $firstinvoice = count($existing_invoices) == 0;
        $new_invoice_id = $class_mi->generateNew($package_id, $order_data, $products, $totals, $firstinvoice);
        $class_mi->setInvoiceComplete($orders_id);
    }
}
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:temp-invoice-generate.php

示例3: printPackageTip

 } else {
     //If product is found
     if (strtoupper($ean_scan) != 'SKIP' && $ean_scan != $item['products_ean']) {
         $result .= printPackageTip(EAN_MISMATCH_ERROR, $item['products_ean'], $ean_scan);
     } else {
         if ($item['status'] < intval($old_status)) {
             //If product status is not yet finish
             $errinfo = $template_error_not_finish;
             $result .= printPackageTip('E', $box_date, $errinfo, $sp_name, $sp_class);
         } elseif ($item['status'] == $old_status) {
             //If product status is finish
             $order = $class_o->retrieveDetail($item['orders_id']);
             $order_date = strtotime($order['date_purchased']);
             $box_date = date('d. M', $order_date);
             //Retrieve all products from the order
             $items = $class_o->retrieveProducts($order['orders_id']);
             foreach ($items as $key => $i) {
                 //Exclude any canceled and complete products
                 $iscanceled = $class_o->productStatusIsCancelled($i['status']);
                 $iscomplete = $i['status'] == '9' || $i['status'] == '11';
                 if ($iscanceled || $iscomplete) {
                     unset($items[$key]);
                 } else {
                     $items[$key]['products_ean'] = $class_ean->getEAN($i['products_id'], $i['products_articles_id']);
                 }
             }
             if ($item['order_item_total'] == '1' || count($items) == 1) {
                 //If order only consist of 1 product
                 $packages = $class_mp->getUsablePackages();
                 if (count($packages) == 0) {
                     //If no usable package found for JNG, create 1
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:packaging.php

示例4: ajaxReturn

         $result['class'] = 'paid';
         $result['status'] = 'ORDER PAID';
     } else {
         $result['class'] = 'unpaid';
         $result['status'] = 'ORDER UNPAID';
     }
     ajaxReturn($result);
     exit;
 } elseif ($_POST['me_action'] == 'REVIVEORDER') {
     $result = '';
     $order_id = tep_db_prepare_input($_POST['order_id']);
     $order = $class_o->retrieveDetail($order_id);
     if ($order['paid_status'] != '1') {
         $result = '<h3 class="red">REVIVE FAILED!</h3><div>Order is still <strong>UNPAID</strong></div>';
     } else {
         $products = $class_o->retrieveProducts($order_id);
         if ($order['dti_referrers_id_commission'] != '0') {
             use_class('dti', DIR_WS_CLASSES);
             $class_dti = new dti();
             $any_deletion_failed = false;
             foreach ($products as $key => $p) {
                 $opid = $p['orders_products_id'];
                 $deleted = $class_dti->deleteCommissionCancel($opid);
                 if (!$deleted) {
                     unset($products[$key]);
                     $any_deletion_failed = true;
                 }
             }
         }
         if (count($products) == 0) {
             $result = '<h3 class="red">REVIVE FAILED!</h3><div>ALL Commissions cancellation are already reported to Partner</div>';
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:order.php

示例5: oiErrorStatus

         $result['op_id'] = $opid;
         $result['old_status'] = $old_status;
         $result['new_status'] = $product['status'];
         $result['msg_sukses'] = '';
         $result['msg_errors'] = oiErrorStatus($opid, $product['status'], $old_status);
     }
     ajaxReturn($result);
     exit;
 } elseif ($_POST['me_action'] == 'REMINDERVORKASSEUNPAID') {
     $opid = tep_db_prepare_input($_POST['op_id']);
     $status = tep_db_prepare_input($_POST['op_status']);
     $is2nd_reminder = tep_db_prepare_input($_POST['is2nd_reminder']);
     $useAltContent = $is2nd_reminder == '1';
     $product = $class_o->retrieveProductDetail($opid);
     if ($product['status'] == $status) {
         $products = $class_o->retrieveProducts($product['orders_id']);
         $opids = array();
         foreach ($products as $p) {
             $opids[] = $p['orders_products_id'];
         }
         $class_o->sendProductStatusNotification($opids, $status, $languages[2]['path'], $useAltContent);
         $result = array();
         $result['op_id'] = implode(',', $opids);
         ajaxReturn($result);
     }
     exit;
 } elseif ($_POST['me_action'] == 'VORKASSEUNPAIDCANCEL') {
     $opid = tep_db_prepare_input($_POST['op_id']);
     $old_status = tep_db_prepare_input($_POST['op_status']);
     $new_status = '12';
     $useAltContent = true;
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:orders-manage.php

示例6: array

//Invoice of vorkasse order has 1 month due date
$prepayment_due_date = '+1 month';
//CREATE INVOICE FOR JNG VORKASSE
//TODO: ADD DATE FILTER, NO NEED TO QUERY ALL ORDERS
$logger->write("CREATING J&G INVOICES");
$query = "SELECT o.orders_id FROM orders o\n        LEFT JOIN payone_invoice pi ON pi.invoice_order_type='J' AND pi.invoice_order_id=o.orders_id\n        WHERE pi.invoice_id IS NULL AND o.payment_method = '{$payment_method_vorkasse}'\n        AND o.orders_id>{$cut_off_orders_id}";
$q = tep_db_query($query);
$orders_array = array();
while ($row = tep_db_fetch_array($q)) {
    $orders_array[] = $row['orders_id'];
}
if (count($orders_array) > 0) {
    foreach ($orders_array as $order_id) {
        $pi_create_counter['jg']++;
        $order = $class_o->retrieveDetail($order_id, true);
        $items = $class_o->retrieveProducts($order_id, true);
        foreach ($items as $key => $item) {
            if ($class_jo->statusIsCancelled($item['status'])) {
                unset($items[$key]);
                break 1;
            }
        }
        //echo "<pre>";var_dump($order);die();
        //Order Items
        //DISABLED THIS => PAYONE INVOICE WILL BE CREATED FOR ALL VORKASSE, EVENTHOUGH ALL ITEMS ARE CANCELLED
        //if(count($items)>0) {
        //PREPARE INVOICE DATA//
        //echo "<pre>";var_dump($items);die();
        $payi->createFromOrderJNG($order, $items, $prepayment_due_date, '0', '0');
        if (tep_db_insert_id() != '') {
            $l_invoice_id = tep_db_insert_id();
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:payone-invoice-sender-vorkasse.php


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