// 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:
rMalie
2011-08-11 15:14:38 +00:00
parent 1dc910a60c
commit 0e4b7fbd72
5 changed files with 24 additions and 3 deletions
+1 -1
View File
@@ -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;
+7
View File
@@ -27,6 +27,13 @@
class PdfInvoiceControllerCore extends FrontController
{
public function run()
{
$this->init();
$this->preProcess();
$this->process();
}
public function process()
{
parent::process();
+7
View File
@@ -27,6 +27,13 @@
class PdfOrderReturnControllerCore extends FrontController
{
public function run()
{
$this->init();
$this->preProcess();
$this->process();
}
public function process()
{
parent::process();
+7
View File
@@ -27,6 +27,13 @@
class PdfOrderSlipControllerCore extends FrontController
{
public function run()
{
$this->init();
$this->preProcess();
$this->process();
}
public function process()
{
parent::process();
+2 -2
View File
@@ -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&amp;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}&amp;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}