// Fix PDF controllers + order-detail template
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8039 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+1
-1
@@ -487,7 +487,7 @@ class PDFCore extends PDF_PageGroupCore
|
||||
if (!$context)
|
||||
$context = Context::getContext();
|
||||
|
||||
if (!Validate::isLoadedObject($order) OR ((isset($context->employee) && !$context->employee->id) AND (!OrderState::invoiceAvailable($order->getCurrentState()) AND !$order->invoice_number)))
|
||||
if (!Validate::isLoadedObject($order) OR (!Validate::isLoadedObject($context->employee) AND (!OrderState::invoiceAvailable($order->getCurrentState()) AND !$order->invoice_number)))
|
||||
die('Invalid order or invalid order state');
|
||||
self::$order = $order;
|
||||
self::$orderSlip = $slip;
|
||||
|
||||
@@ -27,6 +27,13 @@
|
||||
|
||||
class PdfInvoiceControllerCore extends FrontController
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
$this->init();
|
||||
$this->preProcess();
|
||||
$this->process();
|
||||
}
|
||||
|
||||
public function process()
|
||||
{
|
||||
parent::process();
|
||||
|
||||
@@ -27,6 +27,13 @@
|
||||
|
||||
class PdfOrderReturnControllerCore extends FrontController
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
$this->init();
|
||||
$this->preProcess();
|
||||
$this->process();
|
||||
}
|
||||
|
||||
public function process()
|
||||
{
|
||||
parent::process();
|
||||
|
||||
@@ -27,6 +27,13 @@
|
||||
|
||||
class PdfOrderSlipControllerCore extends FrontController
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
$this->init();
|
||||
$this->preProcess();
|
||||
$this->process();
|
||||
}
|
||||
|
||||
public function process()
|
||||
{
|
||||
parent::process();
|
||||
|
||||
@@ -77,9 +77,9 @@
|
||||
<p>
|
||||
<img src="{$img_dir}icon/pdf.gif" alt="" class="icon" />
|
||||
{if $is_guest}
|
||||
<a href="{$link->getPageLink('pdf-invoice', true, NULL, "id_order=$order->id&secure_key=$order->secure_key")}" >{l s='Download your invoice as a .PDF file'}</a>
|
||||
<a href="{$link->getPageLink('pdf-invoice', true, NULL, "id_order={$order->id}&secure_key=$order->secure_key")}" >{l s='Download your invoice as a .PDF file'}</a>
|
||||
{else}
|
||||
<a href="{$link->getPageLink('pdf-invoice', true, NULL, "id_order=$order->id")}" >{l s='Download your invoice as a .PDF file'}</a>
|
||||
<a href="{$link->getPageLink('pdf-invoice', true, NULL, "id_order={$order->id}")}" >{l s='Download your invoice as a .PDF file'}</a>
|
||||
{/if}
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user