本文整理匯總了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>
示例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);
}