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


PHP shopFunctionsF::InvoiceNumberReserved方法代码示例

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


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

示例1:

    ?>
			<tr>
				<td class="key"><strong><?php 
    echo vmText::_('COM_VIRTUEMART_COUPON_CODE');
    ?>
</strong></td>
				<td><?php 
    echo $this->orderbt->coupon_code;
    ?>
</td>
			</tr>
			<?php 
}
?>
			<?php 
if ($this->orderbt->invoiceNumber and !shopFunctionsF::InvoiceNumberReserved($this->orderbt->invoiceNumber)) {
    $invoice_url = juri::root() . 'index.php?option=com_virtuemart&view=invoice&layout=invoice&format=pdf&tmpl=component&virtuemart_order_id=' . $this->orderbt->virtuemart_order_id . '&order_number=' . $this->orderbt->order_number . '&order_pass=' . $this->orderbt->order_pass;
    $invoice_link = "<a title=\"" . vmText::_('COM_VIRTUEMART_INVOICE_PRINT') . "\"  href=\"javascript:void window.open('{$invoice_url}', 'win2', 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no');\"  >";
    $invoice_link .= $this->orderbt->invoiceNumber . '</a>';
    ?>
			<tr>
				<td class="key"><strong><?php 
    echo vmText::_('COM_VIRTUEMART_INVOICE');
    ?>
</strong></td>
				<td><?php 
    echo $invoice_link;
    ?>
</td>
			</tr>
			<?php 
开发者ID:virtuemart-fr,项目名称:virtuemart-fr,代码行数:31,代码来源:order.php

示例2: getInvoicePDF

 function getInvoicePDF($orderDetails = 0, $viewName = 'invoice', $layout = 'invoice', $format = 'html', $force = false)
 {
     // 		$force = true;
     $path = tsmConfig::get('forSale_path', 0);
     if (empty($path)) {
         vmError('No path set to store invoices');
         return false;
     } else {
         $path .= shopFunctionsF::getInvoiceFolderName() . DS;
         if (!file_exists($path)) {
             vmError('Path wrong to store invoices, folder invoices does not exist ' . $path);
             return false;
         } else {
             if (!is_writable($path)) {
                 vmError('Cannot store pdf, directory not writeable ' . $path);
                 return false;
             }
         }
     }
     $orderModel = tmsModel::getModel('orders');
     $invoiceNumberDate = array();
     if (!$orderModel->createInvoiceNumber($orderDetails['details']['BT'], $invoiceNumberDate)) {
         return false;
     }
     if (!empty($invoiceNumberDate[0])) {
         $invoiceNumber = $invoiceNumberDate[0];
     } else {
         $invoiceNumber = FALSE;
     }
     if (!$invoiceNumber or empty($invoiceNumber)) {
         vmError('Cant create pdf, createInvoiceNumber failed');
         return 0;
     }
     if (shopFunctionsF::InvoiceNumberReserved($invoiceNumber)) {
         return 0;
     }
     //$path .= preg_replace('/[^A-Za-z0-9_\-\.]/', '_', 'vm'.$layout.'_'.$invoiceNumber.'.pdf');
     $path .= shopFunctionsF::getInvoiceName($invoiceNumber, $layout) . '.pdf';
     if (file_exists($path) and !$force) {
         return $path;
     }
     //We come from the be, so we need to load the FE language
     tsmConfig::loadJLang('com_virtuemart', true);
     $this->addViewPath(VMPATH_SITE . DS . 'views');
     $view = $this->getView($viewName, $format);
     $this->writeJs = false;
     $view->addTemplatePath(VMPATH_SITE . DS . 'views' . DS . $viewName . DS . 'tmpl');
     if (!class_exists('VmTemplate')) {
         require VMPATH_SITE . DS . 'helpers' . DS . 'vmtemplate.php';
     }
     $template = VmTemplate::loadVmTemplateStyle();
     $templateName = VmTemplate::setTemplate($template);
     if (!empty($templateName)) {
         $TemplateOverrideFolder = JPATH_SITE . DS . "templates" . DS . $templateName . DS . "html" . DS . "com_virtuemart" . DS . "invoice";
         if (file_exists($TemplateOverrideFolder)) {
             $view->addTemplatePath($TemplateOverrideFolder);
         }
     }
     $view->invoiceNumber = $invoiceNumberDate[0];
     $view->invoiceDate = $invoiceNumberDate[1];
     $view->orderDetails = $orderDetails;
     $view->uselayout = $layout;
     $view->showHeaderFooter = false;
     $vendorModel = tmsModel::getModel('vendor');
     $virtuemart_vendor_id = 1;
     //We could set this automatically by the vendorId stored in the order.
     $vendor = $vendorModel->getVendor($virtuemart_vendor_id);
     $metadata = array('title' => tsmText::sprintf('COM_VIRTUEMART_INVOICE_TITLE', $vendor->vendor_store_name, $view->invoiceNumber, $orderDetails['details']['BT']->order_number), 'keywords' => tsmText::_('COM_VIRTUEMART_INVOICE_CREATOR'));
     return VmPdf::createVmPdf($view, $path, 'F', $metadata);
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:70,代码来源:invoice.php

示例3: InvoiceNumberReserved

 static function InvoiceNumberReserved($invoice_number)
 {
     if (!class_exists('ShopFunctionsF')) {
         require JPATH_VM_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php';
     }
     return shopFunctionsF::InvoiceNumberReserved($invoice_number);
 }
开发者ID:lenard112,项目名称:cms,代码行数:7,代码来源:shopfunctions.php

示例4: display

 public function display($tpl = null)
 {
     $document = JFactory::getDocument();
     tsmConfig::loadJLang('com_virtuemart_shoppers', true);
     /* It would be so nice to be able to load the override of the FE additionally from here
     		 * joomlaWantsThisFolder\language\overrides\en-GB.override.ini
     		 * $jlang =JFactory::getLanguage();
     		$tag = $jlang->getTag();
     		$jlang->load('override', 'language/overrides',$tag,true);*/
     //We never want that the cart is indexed
     $document->setMetaData('robots', 'NOINDEX, NOFOLLOW, NOARCHIVE, NOSNIPPET');
     if (empty($this->uselayout)) {
         $layout = vRequest::getCmd('layout', 'mail');
     } else {
         $layout = $this->uselayout;
     }
     switch ($layout) {
         case 'invoice':
             $this->doctype = $layout;
             $title = tsmText::_('COM_VIRTUEMART_INVOICE');
             break;
         case 'deliverynote':
             $this->doctype = $layout;
             $layout = 'invoice';
             $title = tsmText::_('COM_VIRTUEMART_DELIVERYNOTE');
             break;
         case 'confirmation':
             $this->doctype = $layout;
             $layout = 'confirmation';
             $title = tsmText::_('COM_VIRTUEMART_CONFIRMATION');
             break;
         case 'mail':
             if (tsmConfig::get('order_mail_html')) {
                 $layout = 'mail_html';
             } else {
                 $layout = 'mail_raw';
             }
     }
     $this->setLayout($layout);
     $tmpl = vRequest::getCmd('tmpl');
     $this->print = false;
     if ($tmpl and !$this->isPdf) {
         $this->print = true;
     }
     $this->format = vRequest::getCmd('format', 'html');
     if ($layout == 'invoice') {
         $document->setTitle(tsmText::_('COM_VIRTUEMART_INVOICE'));
     }
     $order_print = false;
     if ($this->print and $this->format == 'html') {
         $order_print = true;
     }
     $orderModel = tmsModel::getModel('orders');
     $orderDetails = $this->orderDetails;
     if ($orderDetails == 0) {
         $orderDetails = $orderModel->getMyOrderDetails();
         if (!$orderDetails) {
             echo tsmText::_('COM_VIRTUEMART_CART_ORDER_NOTFOUND');
             vmdebug('COM_VIRTUEMART_CART_ORDER_NOTFOUND and $orderDetails ', $orderDetails);
             return;
         } else {
             if (empty($orderDetails['details'])) {
                 echo tsmText::_('COM_VIRTUEMART_CART_ORDER_DETAILS_NOTFOUND');
                 return;
             }
         }
     }
     if (empty($orderDetails['details'])) {
         echo tsmText::_('COM_VIRTUEMART_ORDER_NOTFOUND');
         return 0;
     }
     if (!empty($orderDetails['details']['BT']->order_language)) {
         tsmConfig::loadJLang('com_virtuemart', true, $orderDetails['details']['BT']->order_language);
         tsmConfig::loadJLang('com_virtuemart_shoppers', true, $orderDetails['details']['BT']->order_language);
         tsmConfig::loadJLang('com_virtuemart_orders', true, $orderDetails['details']['BT']->order_language);
     }
     //QuicknDirty, caching of the result VirtueMartModelCustomfields::calculateModificators must be deleted,
     /*if(!empty($orderDetails['items']) and is_array($orderDetails['items'])){
     
     			$nbPr = count($orderDetails['items']);
     
     			for($k = 0; $k<$nbPr ;$k++){
     				$orderDetails['items'][$k]->modificatorSum = null;
     			}
     			vmdebug('$nbPr',$nbPr);
     		}*/
     $this->assignRef('orderDetails', $orderDetails);
     // if it is order print, invoice number should not be created, either it is there, either it has not been created
     if (empty($this->invoiceNumber) and !$order_print) {
         $invoiceNumberDate = array();
         if ($orderModel->createInvoiceNumber($orderDetails['details']['BT'], $invoiceNumberDate)) {
             if (shopFunctionsF::InvoiceNumberReserved($invoiceNumberDate[0])) {
                 if ($this->uselayout != 'mail') {
                     $document->setTitle(tsmText::_('COM_VIRTUEMART_PAYMENT_INVOICE'));
                     return;
                 }
             }
             $this->invoiceNumber = $invoiceNumberDate[0];
             $this->invoiceDate = $invoiceNumberDate[1];
             if (!$this->invoiceNumber or empty($this->invoiceNumber)) {
//.........这里部分代码省略.........
开发者ID:cuongnd,项目名称:etravelservice,代码行数:101,代码来源:view.html.php


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