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