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


PHP Tools::displayDate方法代码示例

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


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

示例1: fillFromCustomer

 public function fillFromCustomer(Customer $customer)
 {
     $params = get_object_vars($customer);
     $params['id_customer'] = $customer->id;
     $params['birthday'] = $customer->birthday === '0000-00-00' ? null : Tools::displayDate($customer->birthday);
     return $this->fillWith($params);
 }
开发者ID:M03G,项目名称:PrestaShop,代码行数:7,代码来源:CustomerForm.php

示例2: renderForm

 public function renderForm()
 {
     $this->fields_form = array('legend' => array('title' => $this->l('Return Merchandise Authorization (RMA)'), 'image' => '../img/admin/return.gif'), 'input' => array(array('type' => 'hidden', 'name' => 'id_order'), array('type' => 'hidden', 'name' => 'id_customer'), array('type' => 'text_customer', 'label' => $this->l('Customer'), 'name' => '', 'size' => '', 'required' => false), array('type' => 'text_order', 'label' => $this->l('Order'), 'name' => '', 'size' => '', 'required' => false), array('type' => 'free', 'label' => $this->l('Customer explanation'), 'name' => 'question', 'size' => '', 'required' => false), array('type' => 'select', 'label' => $this->l('Status'), 'name' => 'state', 'required' => false, 'options' => array('query' => OrderReturnState::getOrderReturnStates($this->context->language->id), 'id' => 'id_order_return_state', 'name' => 'name'), 'desc' => $this->l('Merchandise return (RMA) status.')), array('type' => 'list_products', 'label' => $this->l('Products'), 'name' => '', 'size' => '', 'required' => false, 'desc' => $this->l('List of products in return package.')), array('type' => 'pdf_order_return', 'label' => $this->l('Return slip'), 'name' => '', 'size' => '', 'required' => false, 'desc' => $this->l('The link is only available after validation and before the parcel gets delivered.'))), 'submit' => array('title' => $this->l('Save')));
     $order = new Order($this->object->id_order);
     $quantity_displayed = array();
     // Customized products */
     if ($returned_customizations = OrderReturn::getReturnedCustomizedProducts((int) $this->object->id_order)) {
         foreach ($returned_customizations as $returned_customization) {
             $quantity_displayed[(int) $returned_customization['id_order_detail']] = isset($quantity_displayed[(int) $returned_customization['id_order_detail']]) ? $quantity_displayed[(int) $returned_customization['id_order_detail']] + (int) $returned_customization['product_quantity'] : (int) $returned_customization['product_quantity'];
         }
     }
     // Classic products
     $products = OrderReturn::getOrdersReturnProducts($this->object->id, $order);
     // Prepare customer explanation for display
     $this->object->question = '<span class="normal-text">' . nl2br($this->object->question) . '</span>';
     $this->tpl_form_vars = array('customer' => new Customer($this->object->id_customer), 'url_customer' => 'index.php?tab=AdminCustomers&id_customer=' . (int) $this->object->id_customer . '&viewcustomer&token=' . Tools::getAdminToken('AdminCustomers' . (int) Tab::getIdFromClassName('AdminCustomers') . (int) $this->context->employee->id), 'text_order' => sprintf($this->l('Order #%1$d from %2$s'), $order->id, Tools::displayDate($order->date_upd)), 'url_order' => 'index.php?tab=AdminOrders&id_order=' . (int) $order->id . '&vieworder&token=' . Tools::getAdminToken('AdminOrders' . (int) Tab::getIdFromClassName('AdminOrders') . (int) $this->context->employee->id), 'picture_folder' => _THEME_PROD_PIC_DIR_, 'returnedCustomizations' => $returned_customizations, 'customizedDatas' => Product::getAllCustomizedDatas((int) $order->id_cart), 'products' => $products, 'quantityDisplayed' => $quantity_displayed, 'id_order_return' => $this->object->id, 'state_order_return' => $this->object->state);
     return parent::renderForm();
 }
开发者ID:ortegon000,项目名称:tienda,代码行数:18,代码来源:AdminReturnController.php

示例3: __construct

 public function __construct($order, $smarty)
 {
     $this->order = $order;
     $this->smarty = $smarty;
     $this->title = 'Order #' . $this->order->id;
     // header informations
     $this->date = Tools::displayDate($order->date_add, null);
     // footer informations
     $this->shop = new Shop((int) $this->order->id_shop);
 }
开发者ID:pacxs,项目名称:pacxscom,代码行数:10,代码来源:HTMLTemplateOrderPdf.php

示例4: __construct

 /**
  * @param OrderInvoice $order_invoice
  * @param $smarty
  * @throws PrestaShopException
  */
 public function __construct(OrderInvoice $order_invoice, $smarty)
 {
     $this->order_invoice = $order_invoice;
     $this->order = new Order((int) $this->order_invoice->id_order);
     $this->smarty = $smarty;
     // header informations
     $this->date = Tools::displayDate($order_invoice->date_add);
     $id_lang = Context::getContext()->language->id;
     $this->title = $order_invoice->getInvoiceNumberFormatted($id_lang);
     $this->shop = new Shop((int) $this->order->id_shop);
 }
开发者ID:Rohit-jn,项目名称:hotelcommerce,代码行数:16,代码来源:HTMLTemplateInvoice.php

示例5: __construct

 /**
  * @param OrderReturn $order_return
  * @param $smarty
  * @throws PrestaShopException
  */
 public function __construct(OrderReturn $order_return, $smarty)
 {
     $this->order_return = $order_return;
     $this->smarty = $smarty;
     $this->order = new Order($order_return->id_order);
     // header informations
     $this->date = Tools::displayDate($this->order->invoice_date);
     $prefix = Configuration::get('PS_RETURN_PREFIX', Context::getContext()->language->id);
     $this->title = sprintf(HTMLTemplateOrderReturn::l('%1$s%2$06d'), $prefix, $this->order_return->id);
     $this->shop = new Shop((int) $this->order->id_shop);
 }
开发者ID:prestanesia,项目名称:PrestaShop,代码行数:16,代码来源:HTMLTemplateOrderReturn.php

示例6: __construct

 public function __construct(OrderInvoice $order_invoice, $smarty)
 {
     $this->order_invoice = $order_invoice;
     $this->order = new Order($this->order_invoice->id_order);
     $this->smarty = $smarty;
     // header informations
     $this->date = Tools::displayDate($this->order->invoice_date);
     $this->title = HTMLTemplateDeliverySlip::l('Delivery') . ' #' . Configuration::get('PS_DELIVERY_PREFIX', Context::getContext()->language->id) . sprintf('%06d', $this->order_invoice->delivery_number);
     // footer informations
     $this->shop = new Shop((int) $this->order->id_shop);
 }
开发者ID:toufikadfab,项目名称:PrestaShop-1.5,代码行数:11,代码来源:HTMLTemplateDeliverySlip.php

示例7: __construct

 public function __construct(OrderReturn $order_return, $smarty)
 {
     $this->order_return = $order_return;
     $this->smarty = $smarty;
     $this->order = new Order($order_return->id_order);
     // header informations
     $this->date = Tools::displayDate($this->order->invoice_date);
     $this->title = sprintf(HTMLTemplateOrderReturn::l('Order Return #%06d'), $this->order_return->id);
     // footer informations
     $this->shop = new Shop((int) $this->order->id_shop);
 }
开发者ID:ecssjapan,项目名称:guiding-you-afteropen,代码行数:11,代码来源:HTMLTemplateOrderReturn.php

示例8: __construct

 public function __construct(OrderInvoice $order_invoice, $smarty)
 {
     $this->order_invoice = $order_invoice;
     $this->order = new Order((int) $this->order_invoice->id_order);
     $this->smarty = $smarty;
     // header informations
     $this->date = Tools::displayDate($order_invoice->date_add);
     $id_lang = Context::getContext()->language->id;
     $this->title = HTMLTemplateInvoice::l('Invoice ') . ' #' . Configuration::get('PS_INVOICE_PREFIX', $id_lang, null, (int) $this->order->id_shop) . sprintf('%06d', $order_invoice->number);
     // footer informations
     $this->shop = new Shop((int) $this->order->id_shop);
 }
开发者ID:IngenioContenidoDigital,项目名称:americana,代码行数:12,代码来源:HTMLTemplateInvoice.php

示例9: __construct

 public function __construct(SupplyOrder $supply_order, $smarty)
 {
     $this->supply_order = $supply_order;
     $this->smarty = $smarty;
     $this->context = Context::getContext();
     $this->warehouse = new Warehouse((int) $supply_order->id_warehouse);
     $this->address_warehouse = new Address((int) $this->warehouse->id_address);
     $this->address_supplier = new Address(Address::getAddressIdBySupplierId((int) $supply_order->id_supplier));
     // header informations
     $this->date = Tools::displayDate($supply_order->date_add);
     $this->title = HTMLTemplateSupplyOrderForm::l('Supply order form');
 }
开发者ID:dev-lav,项目名称:htdocs,代码行数:12,代码来源:HTMLTemplateSupplyOrderForm.php

示例10: hookNewOrder

    public function hookNewOrder($params)
    {
        if (!$this->_merchant_order or empty($this->_merchant_mails)) {
            return;
        }
        // Getting differents vars
        $id_lang = intval(Configuration::get('PS_LANG_DEFAULT'));
        $currency = $params['currency'];
        $configuration = Configuration::getMultiple(array('PS_SHOP_EMAIL', 'PS_MAIL_METHOD', 'PS_MAIL_SERVER', 'PS_MAIL_USER', 'PS_MAIL_PASSWD', 'PS_SHOP_NAME'));
        $order = $params['order'];
        $customer = $params['customer'];
        $delivery = new Address(intval($order->id_address_delivery));
        $invoice = new Address(intval($order->id_address_invoice));
        $order_date_text = Tools::displayDate($order->date_add, intval($id_lang));
        $carrier = new Carrier(intval($order->id_carrier));
        $message = $order->getFirstMessage();
        if (!$message or empty($message)) {
            $message = $this->l('No message');
        }
        $itemsTable = '';
        foreach ($params['cart']->getProducts() as $key => $product) {
            $unit_price = Product::getPriceStaticLC($product['id_product'], true, $product['id_product_attribute']);
            $price = Product::getPriceStaticLC($product['id_product'], true, $product['id_product_attribute'], 6, NULL, false, true, $product['quantity']);
            $itemsTable .= '<tr style="background-color:' . ($key % 2 ? '#DDE2E6' : '#EBECEE') . ';">
					<td style="padding:0.6em 0.4em;">' . $product['reference'] . '</td>
					<td style="padding:0.6em 0.4em;"><strong>' . $product['name'] . (isset($product['attributes_small']) ? ' ' . $product['attributes_small'] : '') . '</strong></td>
					<td style="padding:0.6em 0.4em; text-align:right;">' . Tools::displayPrice($unit_price, $currency, false, false) . '</td>
					<td style="padding:0.6em 0.4em; text-align:center;">' . intval($product['quantity']) . '</td>
					<td style="padding:0.6em 0.4em; text-align:right;">' . Tools::displayPrice($price * $product['quantity'], $currency, false, false) . '</td>
				</tr>';
        }
        foreach ($params['cart']->getDiscounts() as $discount) {
            $itemsTable .= '<tr style="background-color:#EBECEE;">
					<td colspan="4" style="padding:0.6em 0.4em; text-align:right;">' . $this->l('Voucher code:') . ' ' . $discount['name'] . '</td>
					<td style="padding:0.6em 0.4em; text-align:right;">-' . Tools::displayPrice($discount['value_real'], $currency, false, false) . '</td>
			</tr>';
        }
        if ($delivery->id_state) {
            $delivery_state = new State(intval($delivery->id_state));
        }
        if ($invoice->id_state) {
            $invoice_state = new State(intval($invoice->id_state));
        }
        // Filling-in vars for email
        $template = 'new_order';
        $subject = $this->l('New order');
        $templateVars = array('{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{delivery_company}' => $delivery->company, '{delivery_firstname}' => $delivery->firstname, '{delivery_lastname}' => $delivery->lastname, '{delivery_address1}' => $delivery->address1, '{delivery_address2}' => $delivery->address2, '{delivery_city}' => $delivery->city, '{delivery_postal_code}' => $delivery->postcode, '{delivery_country}' => $delivery->country, '{delivery_state}' => $delivery->id_state ? $delivery_state->name : '', '{delivery_phone}' => $delivery->phone, '{delivery_other}' => $delivery->other, '{invoice_company}' => $invoice->company, '{invoice_firstname}' => $invoice->firstname, '{invoice_lastname}' => $invoice->lastname, '{invoice_address2}' => $invoice->address2, '{invoice_address1}' => $invoice->address1, '{invoice_city}' => $invoice->city, '{invoice_postal_code}' => $invoice->postcode, '{invoice_country}' => $invoice->country, '{invoice_state}' => $invoice->id_state ? $invoice_state->name : '', '{invoice_phone}' => $invoice->phone, '{invoice_other}' => $invoice->other, '{order_name}' => sprintf("%06d", $order->id), '{shop_name}' => Configuration::get('PS_SHOP_NAME'), '{date}' => $order_date_text, '{carrier}' => $carrier->name == '0' ? Configuration::get('PS_SHOP_NAME') : $carrier->name, '{payment}' => $order->payment, '{items}' => $itemsTable, '{total_paid}' => Tools::displayPrice($order->total_paid, $currency), '{total_products}' => Tools::displayPrice($order->getTotalProductsWithTaxes(), $currency), '{total_discounts}' => Tools::displayPrice($order->total_discounts, $currency), '{total_shipping}' => Tools::displayPrice($order->total_shipping, $currency), '{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $currency), '{currency}' => $currency->sign, '{message}' => $message);
        $iso = Language::getIsoById(intval($id_lang));
        if (file_exists(dirname(__FILE__) . '/mails/' . $iso . '/' . $template . '.txt') and file_exists(dirname(__FILE__) . '/mails/' . $iso . '/' . $template . '.html')) {
            Mail::Send($id_lang, $template, $subject, $templateVars, explode(self::__MA_MAIL_DELIMITOR__, $this->_merchant_mails), NULL, $configuration['PS_SHOP_EMAIL'], $configuration['PS_SHOP_NAME'], NULL, NULL, dirname(__FILE__) . '/mails/');
        }
    }
开发者ID:redb,项目名称:prestashop,代码行数:52,代码来源:mailalerts.php

示例11: __construct

 public function __construct($supply_order, $smarty)
 {
     $this->supply_order = $supply_order;
     $this->order = $supply_order;
     $this->smarty = $smarty;
     $this->context = Context::getContext();
     $this->warehouse = new Warehouse((int) $supply_order->id_warehouse);
     $this->address_warehouse = new Address((int) $this->warehouse->id_address);
     $this->address_supplier = new Address(Address::getAddressIdBySupplierId((int) $supply_order->id_supplier));
     // header informations
     $this->date = Tools::displayDate($supply_order->date_add);
     $this->title = Tools::getValue('submitAction') == 'generateSupplyOrderFormPDF' ? HTMLTemplateErpSupplyOrderForm::l('Supply order form') : HTMLTemplateSupplyOrderForm::l('Receiving slip form');
 }
开发者ID:prestamodule,项目名称:erpillicopresta,代码行数:13,代码来源:HTMLTemplateErpSupplyOrderForm.php

示例12: postProcess

 public function postProcess()
 {
     $cart = $this->context->cart;
     $invoice = new Address((int) $cart->id_address_invoice);
     $customer = new Customer($cart->id_customer);
     if ($cart->id_customer == 0 || $cart->id_address_delivery == 0 || $cart->id_address_invoice == 0 || !$this->module->active) {
         Tools::redirect('index.php?controller=order&step=1');
     }
     // Check that this payment option is still available in case the customer changed his address just before the end of the checkout process
     $authorized = false;
     foreach (Module::getPaymentModules() as $module) {
         if ($module['name'] == 'debitnote') {
             $authorized = true;
             break;
         }
     }
     if (!$authorized) {
         die($this->module->l('This payment method is not available.', 'validation'));
     }
     $accountholder_name = $_POST['accountholder_name'];
     $account_number = $_POST['account_number'];
     $bank_code = $_POST['bank_code'];
     $bank_name = $_POST['bank_name'];
     $bank_bic = $_POST['bank_bic'];
     $bank_iban = $_POST['bank_iban'];
     $ip_address = $_POST['ip_address'];
     // Getting differents vars
     $context = Context::getContext();
     $id_lang = (int) $context->language->id;
     $id_shop = (int) $context->shop->id;
     if (!$context) {
         $context = Context::getContext();
     }
     $order = new Order($this->id_order);
     //$order = $params['order'];
     //$configuration = Configuration::getMultiple(array('PS_SHOP_EMAIL', 'PS_MAIL_METHOD', 'PS_MAIL_SERVER', 'PS_MAIL_USER', 'PS_MAIL_PASSWD', 'PS_SHOP_NAME', 'PS_MAIL_COLOR'), $id_lang, null, $id_shop);
     if (!Validate::isLoadedObject($customer)) {
         Tools::redirect('index.php?controller=order&step=1');
     }
     if (!Validate::isLoadedObject($invoice)) {
         Tools::redirect('index.php?controller=order&step=1');
     }
     $currency = $this->context->currency;
     $total = (double) $cart->getOrderTotal(true, Cart::BOTH);
     $message = 'Kontoinhaber:' . $accountholder_name . '<br>' . '  Kto:' . $account_number . '  BLZ:' . $bank_code . '  Bank:' . $bank_name . '  BIC:' . $bank_bic . '  IBAN:' . $bank_iban;
     //Mail Vars für Kunden Mail debitnote.html
     $mailVars = array('{bankwire_owner}' => Configuration::get('BANK_WIRE_OWNER'), '{bankwire_details}' => nl2br(Configuration::get('BANK_WIRE_DETAILS')), '{bankwire_address}' => nl2br(Configuration::get('BANK_WIRE_ADDRESS')), '{email}' => $this->context->customer->email, '{date}' => Tools::displayDate(date('Y-m-d H:i:s'), null, 0), '{invoice_company}' => $invoice->company, '{invoice_firstname}' => $invoice->firstname, '{invoice_lastname}' => $invoice->lastname, '{invoice_address2}' => $invoice->address1, '{invoice_address1}' => $invoice->address2, '{invoice_city}' => $invoice->city, '{invoice_postal_code}' => $invoice->postcode, '{invoice_country}' => $invoice->country, '{BankBIC}' => $bank_bic, '{BankIBAN}' => $bank_iban, '{Debit_identifier}' => Configuration::get('DEBITNOTE_CREDITOR_IDENTIFIER'), '{shop_name}' => Configuration::get('PS_SHOP_NAME'), '{shop_address1}' => Configuration::get('PS_SHOP_ADDR1'), '{shop_address2}' => Configuration::get('PS_SHOP_ADDR2'), '{shop_plz}' => Configuration::get('PS_SHOP_CODE'), '{shop_city}' => Configuration::get('PS_SHOP_CITY'));
     $this->module->validateOrder((int) $cart->id, Configuration::get('PS_OS_DEBITNOTE'), $total, $this->module->displayName, $message, $mailVars, (int) $currency->id, false, $customer->secure_key);
     $this->module->writeDebitNoteDetails($this->module->currentOrder, $accountholder_name, $account_number, $bank_code, $bank_name, $bank_bic, $bank_iban, '123');
     Tools::redirect('index.php?controller=order-confirmation&id_cart=' . $cart->id . '&id_module=' . $this->module->id . '&id_order=' . $this->module->currentOrder . '&key=' . $customer->secure_key);
 }
开发者ID:sigma001,项目名称:prestashop-debitnote,代码行数:51,代码来源:validation.php

示例13: displayOrdersTable

 private function displayOrdersTable()
 {
     $order_state = new OrderState((int) Configuration::get('MONDIAL_RELAY_ORDER_STATE'), $this->context->language->id);
     $orders = MondialRelay::getOrders(array(), MondialRelay::NO_FILTER, $this->mondialrelay->account_shop['MR_WEIGHT_COEFFICIENT']);
     // Simulate a ticket generation
     $MRCreateTicket = new MRCreateTickets(array('orderIdList' => NULL, 'totalOrder' => NULL, 'weightList' => NULL));
     foreach ($orders as &$order) {
         $order['display_total_price'] = Tools::displayPrice($order['total'], new Currency($order['id_currency']));
         $order['display_shipping_price'] = Tools::displayPrice($order['shipping'], new Currency($order['id_currency']));
         $order['display_date'] = Tools::displayDate($order['date'], $order['id_lang']);
     }
     $this->context->smarty->assign(array('MR_token_admin_module' => Tools::getAdminToken('AdminModules' . (int) Tab::getIdFromClassName('AdminModules') . (int) $this->context->employee->id), 'MR_token_admin_contact' => Tools::getAdminToken('AdminContact' . (int) Tab::getIdFromClassName('AdminContact') . (int) $this->context->employee->id), 'MR_token_admin_orders' => Tools::getAdminToken('AdminOrders' . (int) Tab::getIdFromClassName('AdminOrders') . (int) $this->context->employee->id), 'MR_order_state_name' => $order_state->name, 'MR_orders' => $orders, 'MR_PS_IMG_DIR_' => _PS_IMG_DIR_, 'MR_errors_type' => $MRCreateTicket->checkPreValidation()));
     unset($order_state);
     echo $this->context->smarty->fetch(dirname(__FILE__) . '/tpl/admintab/generate_tickets.tpl');
 }
开发者ID:greench,项目名称:prestashop,代码行数:15,代码来源:AdminMondialRelay.php

示例14: __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

示例15: __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


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