當前位置: 首頁>>代碼示例>>PHP>>正文


PHP J2Store::invoice方法代碼示例

本文整理匯總了PHP中J2Store::invoice方法的典型用法代碼示例。如果您正苦於以下問題:PHP J2Store::invoice方法的具體用法?PHP J2Store::invoice怎麽用?PHP J2Store::invoice使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在J2Store的用法示例。


在下文中一共展示了J2Store::invoice方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

if ($task == 'printOrder') {
    ?>
    <script type="text/javascript">
           window.print();
    </script>
<?php 
}
?>

<div class="j2store-order">
	<div class="j2store-invoice-template">
	<?php 
if (isset($this->order) && $this->error == false) {
    ?>
		<?php 
    echo J2Store::invoice()->getFormatedInvoice($this->order, array());
    ?>
		
	<?php 
} else {
    ?>
		<div class="alert alert-block alert-warning">
			<?php 
    echo $this->errormsg;
    ?>
		</div>
	<?php 
}
?>
	</div>
</div>
開發者ID:davetheapple,項目名稱:oakencraft,代碼行數:31,代碼來源:view.php

示例2: createOrderPdf

 public function createOrderPdf()
 {
     $app = JFactory::getApplication();
     $order_id = $this->input->getString('order_id');
     $view = $this->getThisView();
     if ($model = $this->getThisModel()) {
         // Push the model into the view (as default)
         $view->setModel($model, true);
     }
     $order = F0FTable::getInstance('Order', 'J2StoreTable')->getClone();
     $order->load(array('order_id' => $order_id));
     if ($this->validate($order)) {
         $error = false;
         $view->assign('order', $order);
     } else {
         $msg = JText::_('J2STORE_ORDER_MISMATCH_OR_NOT_FOUND');
         $msg_type = 'warning';
         $error = true;
         $view->assign('errormsg', $msg);
     }
     if (!$error) {
         $msg_type = 'success';
         $name = 'j2store_invoice_' . $order->order_id;
         $msg = JText::_('J2STORE_INVOICE_PDF_GENERATED_SUCCESSFULLY');
         if (!J2Store::invoice()->createPdf($order)) {
             $msg_type = 'warning';
             $msg = JText::_('J2STORE_INVOICE_PDF_GENERATED_ERROR');
         }
     }
     $this->setRedirect(JRoute::_('index.php?option=com_j2store&view=myprofile'), $msg, $msg_type);
 }
開發者ID:davetheapple,項目名稱:oakencraft,代碼行數:31,代碼來源:myprofile.php


注:本文中的J2Store::invoice方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。