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


PHP OrderSlip::getOrdersSlipProducts方法代码示例

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


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

示例1: processGenerateOrderSlipPDF

 public function processGenerateOrderSlipPDF()
 {
     $order_slip = new OrderSlip((int) Tools::getValue('id_order_slip'));
     $order = new Order((int) $order_slip->id_order);
     if (!Validate::isLoadedObject($order)) {
         die($this->trans('The order cannot be found within your database.', array(), 'Admin.OrdersCustomers.Notification'));
     }
     $order->products = OrderSlip::getOrdersSlipProducts($order_slip->id, $order);
     $this->generatePDF($order_slip, PDF::TEMPLATE_ORDER_SLIP);
 }
开发者ID:M03G,项目名称:PrestaShop,代码行数:10,代码来源:AdminPdfController.php

示例2: processGenerateOrderSlipPDF

 public function processGenerateOrderSlipPDF()
 {
     $order_slip = new OrderSlip((int) Tools::getValue('id_order_slip'));
     $order = new Order((int) $order_slip->id_order);
     if (!Validate::isLoadedObject($order)) {
         die(Tools::displayError('The order cannot be found within your database.'));
     }
     $order->products = OrderSlip::getOrdersSlipProducts($order_slip->id, $order);
     $this->generatePDF($order_slip, PDF::TEMPLATE_ORDER_SLIP);
 }
开发者ID:prestanesia,项目名称:PrestaShop,代码行数:10,代码来源:AdminPdfController.php

示例3: generateOrderSlipPDF

function generateOrderSlipPDF()
{
    $orderSlip = new OrderSlip((int) $_GET['id_order_slip']);
    $order = new Order((int) $orderSlip->id_order);
    if (!Validate::isLoadedObject($order)) {
        die(Tools::displayError('Cannot find order in database'));
    }
    $order->products = OrderSlip::getOrdersSlipProducts($orderSlip->id, $order);
    $tmp = NULL;
    PDF::invoice($order, 'D', false, $tmp, $orderSlip);
}
开发者ID:greench,项目名称:prestashop,代码行数:11,代码来源:pdf.php

示例4: __construct

 public function __construct(OrderSlip $order_slip, $smarty)
 {
     $this->order_slip = $order_slip;
     $this->order = new Order((int) $order_slip->id_order);
     $products = OrderSlip::getOrdersSlipProducts($this->order_slip->id, $this->order);
     $customized_datas = Product::getAllCustomizedDatas((int) $this->order->id_cart);
     Product::addCustomizationPrice($products, $customized_datas);
     $this->order->products = $products;
     $this->smarty = $smarty;
     // header informations
     $this->date = Tools::displayDate($this->order_slip->date_add);
     $this->title = HTMLTemplateOrderSlip::l('Order slip #') . Configuration::get('PS_CREDIT_SLIP_PREFIX', Context::getContext()->language->id) . sprintf('%06d', (int) $this->order_slip->id);
     // footer informations
     $this->shop = new Shop((int) $this->order->id_shop);
 }
开发者ID:carloslastresDev,项目名称:HealthyTaiwan_UsingPrestaShop,代码行数:15,代码来源:HTMLTemplateOrderSlip.php

示例5: __construct

 public function __construct(OrderSlip $order_slip, $smarty)
 {
     $this->order_slip = $order_slip;
     $this->order = new Order((int) $order_slip->id_order);
     $products = OrderSlip::getOrdersSlipProducts($this->order_slip->id, $this->order);
     $customized_datas = Product::getAllCustomizedDatas((int) $this->order->id_cart);
     Product::addCustomizationPrice($products, $customized_datas);
     $this->order->products = $products;
     $this->smarty = $smarty;
     // header informations
     $this->date = Tools::displayDate($this->order->invoice_date, (int) $this->order->id_lang);
     $this->title = HTMLTemplateOrderSlip::l('Slip #') . sprintf('%06d', (int) $this->order_slip->id);
     // footer informations
     $this->shop = new Shop((int) $this->order->id_shop);
 }
开发者ID:jicheng17,项目名称:vipinsg,代码行数:15,代码来源:HTMLTemplateOrderSlip.php

示例6: __construct

 /**
  * @param OrderSlip $order_slip
  * @param $smarty
  * @throws PrestaShopException
  */
 public function __construct(OrderSlip $order_slip, $smarty)
 {
     $this->order_slip = $order_slip;
     $this->order = new Order((int) $order_slip->id_order);
     $this->id_cart = $this->order->id_cart;
     $products = OrderSlip::getOrdersSlipProducts($this->order_slip->id, $this->order);
     foreach ($products as $product) {
         $customized_datas = Product::getAllCustomizedDatas($this->id_cart, null, true, null, (int) $product['id_customization']);
         Product::addProductCustomizationPrice($product, $customized_datas);
     }
     $this->order->products = $products;
     $this->smarty = $smarty;
     // header informations
     $this->date = Tools::displayDate($this->order_slip->date_add);
     $prefix = Configuration::get('PS_CREDIT_SLIP_PREFIX', Context::getContext()->language->id);
     $this->title = sprintf(HTMLTemplateOrderSlip::l('%1$s%2$06d'), $prefix, (int) $this->order_slip->id);
     $this->shop = new Shop((int) $this->order->id_shop);
 }
开发者ID:M03G,项目名称:PrestaShop,代码行数:23,代码来源:HTMLTemplateOrderSlip.php

示例7: die

if (isset($_GET['pdf'])) {
    if (!isset($_GET['id_order'])) {
        die(Tools::displayError('order ID is missing'));
    }
    $order = new Order(intval($_GET['id_order']));
    if (!Validate::isLoadedObject($order)) {
        die(Tools::displayError('cannot find order in database'));
    }
    PDF::invoice($order);
} elseif (isset($_GET['id_order_slip'])) {
    $orderSlip = new OrderSlip(intval($_GET['id_order_slip']));
    $order = new Order(intval($orderSlip->id_order));
    if (!Validate::isLoadedObject($order)) {
        die(Tools::displayError('cannot find order in database'));
    }
    $order->products = OrderSlip::getOrdersSlipProducts($orderSlip->id, $order);
    $tmp = NULL;
    PDF::invoice($order, 'D', false, $tmp, $orderSlip);
} elseif (isset($_GET['id_delivery'])) {
    $order = Order::getByDelivery(intval($_GET['id_delivery']));
    if (!Validate::isLoadedObject($order)) {
        die(Tools::displayError('cannot find order in database'));
    }
    $tmp = NULL;
    PDF::invoice($order, 'D', false, $tmp, false, $order->delivery_number);
} elseif (isset($_GET['invoices'])) {
    $invoices = Order::getOrdersIdInvoiceByDate($_GET['date_from'], $_GET['date_to'], NULL, 'invoice');
    if (is_array($invoices)) {
        PDF::multipleInvoices($invoices);
    }
} elseif (isset($_GET['deliveryslips'])) {
开发者ID:Bruno-2M,项目名称:prestashop,代码行数:31,代码来源:pdf.php

示例8: multipleOrderSlips

 public static function multipleOrderSlips($orderSlips)
 {
     $pdf = new PDF('P', 'mm', 'A4');
     foreach ($orderSlips as $id_order_slip) {
         $orderSlip = new OrderSlip((int) $id_order_slip);
         $order = new Order((int) $orderSlip->id_order);
         $order->products = OrderSlip::getOrdersSlipProducts($orderSlip->id, $order);
         if (Validate::isLoadedObject($orderSlip) and Validate::isLoadedObject($order)) {
             PDF::invoice($order, 'D', true, $pdf, $orderSlip);
         }
     }
     return $pdf->Output('order_slips.pdf', 'D');
 }
开发者ID:greench,项目名称:prestashop,代码行数:13,代码来源:PDF.php

示例9: dirname

<?php

include dirname(__FILE__) . '/config/config.inc.php';
include dirname(__FILE__) . '/init.php';
$cookie = new Cookie('ps');
if (!$cookie->isLogged()) {
    Tools::redirect('authentication.php?back=order-follow.php');
}
if (isset($_GET['id_order_slip']) and Validate::isUnsignedId($_GET['id_order_slip'])) {
    $orderSlip = new OrderSlip(intval($_GET['id_order_slip']));
}
if (!isset($orderSlip) or !Validate::isLoadedObject($orderSlip)) {
    die(Tools::displayError('order return not found'));
} elseif ($orderSlip->id_customer != $cookie->id_customer) {
    die(Tools::displayError('order return not found'));
}
$order = new Order(intval($orderSlip->id_order));
if (!Validate::isLoadedObject($order)) {
    die(Tools::displayError('order not found'));
}
$order->products = OrderSlip::getOrdersSlipProducts(intval($orderSlip->id), $order);
$ref = NULL;
PDF::invoice($order, 'D', false, $ref, $orderSlip);
开发者ID:Bruno-2M,项目名称:prestashop,代码行数:23,代码来源:pdf-order-slip.php


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