// 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)
|
if (!$context)
|
||||||
$context = Context::getContext();
|
$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');
|
die('Invalid order or invalid order state');
|
||||||
self::$order = $order;
|
self::$order = $order;
|
||||||
self::$orderSlip = $slip;
|
self::$orderSlip = $slip;
|
||||||
|
|||||||
@@ -27,6 +27,13 @@
|
|||||||
|
|
||||||
class PdfInvoiceControllerCore extends FrontController
|
class PdfInvoiceControllerCore extends FrontController
|
||||||
{
|
{
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
$this->init();
|
||||||
|
$this->preProcess();
|
||||||
|
$this->process();
|
||||||
|
}
|
||||||
|
|
||||||
public function process()
|
public function process()
|
||||||
{
|
{
|
||||||
parent::process();
|
parent::process();
|
||||||
|
|||||||
@@ -27,6 +27,13 @@
|
|||||||
|
|
||||||
class PdfOrderReturnControllerCore extends FrontController
|
class PdfOrderReturnControllerCore extends FrontController
|
||||||
{
|
{
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
$this->init();
|
||||||
|
$this->preProcess();
|
||||||
|
$this->process();
|
||||||
|
}
|
||||||
|
|
||||||
public function process()
|
public function process()
|
||||||
{
|
{
|
||||||
parent::process();
|
parent::process();
|
||||||
|
|||||||
@@ -27,6 +27,13 @@
|
|||||||
|
|
||||||
class PdfOrderSlipControllerCore extends FrontController
|
class PdfOrderSlipControllerCore extends FrontController
|
||||||
{
|
{
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
$this->init();
|
||||||
|
$this->preProcess();
|
||||||
|
$this->process();
|
||||||
|
}
|
||||||
|
|
||||||
public function process()
|
public function process()
|
||||||
{
|
{
|
||||||
parent::process();
|
parent::process();
|
||||||
|
|||||||
@@ -77,9 +77,9 @@
|
|||||||
<p>
|
<p>
|
||||||
<img src="{$img_dir}icon/pdf.gif" alt="" class="icon" />
|
<img src="{$img_dir}icon/pdf.gif" alt="" class="icon" />
|
||||||
{if $is_guest}
|
{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}
|
{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}
|
{/if}
|
||||||
</p>
|
</p>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in New Issue
Block a user