From 7e7e932815c5d8ece0846f0823c4a29def228d02 Mon Sep 17 00:00:00 2001 From: tDidierjean Date: Thu, 10 May 2012 10:04:37 +0000 Subject: [PATCH] [-] FO : fix #PSCFV-548 - when ordering out of stock downloadable product, the download is not available in order history --- controllers/front/OrderDetailController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/front/OrderDetailController.php b/controllers/front/OrderDetailController.php index dfb1dba3d..9079c751d 100644 --- a/controllers/front/OrderDetailController.php +++ b/controllers/front/OrderDetailController.php @@ -169,7 +169,7 @@ class OrderDetailControllerCore extends FrontController 'currency' => new Currency($order->id_currency), 'order_state' => (int)($id_order_state), 'invoiceAllowed' => (int)(Configuration::get('PS_INVOICE')), - 'invoice' => (OrderState::invoiceAvailable($id_order_state) && $order->invoice_number), + 'invoice' => (OrderState::invoiceAvailable($id_order_state) && count($order->getInvoicesCollection())), 'order_history' => $order->getHistory($this->context->language->id, false, true), 'products' => $products, 'discounts' => $order->getCartRules(),