Jump to content

Problem with invoice generated from new order status


Recommended Posts

Hi all,

 

I've created a new order status, associated with a new email template.

When I change the order status to this new one, everything seems correct and the invoice is created.

My problem is that, even if I flagged the option "Allow user to download and view PDF version of invoice", the invoice is not showed to the customer on his Order History pannel.

 

Does anybody have some idea of what am I missing?

Link to comment
Share on other sites

are you using a custom theme? what version of prestashop are you using?

 

in v.1.4.8.2, the logic to show the invoice on the order detail page is as follows (from order-detail.tpl)

{if $invoice AND $invoiceAllowed}
<p>
   <img src="{$img_dir}icon/pdf.gif" alt="" class="icon" />
   <a href="{$link->getPageLink('pdf-invoice.php', true)}?id_order={$order->id|intval}{if $is_guest}&secure_key={$order->secure_key}{/if}">{l s='Download your invoice as a .PDF file'}</a>
</p>
{/if}

 

'invoice' is defined as follows. It means the order state you created has an invoice and the order has an invoice number. are both of these things true?

'invoice' => (OrderState::invoiceAvailable((int)($id_order_state)) AND $order->invoice_number),

 

'invoiceAllowed' is defined as follows. This is just a global system setting, which I will assume is true.

'invoiceAllowed' => (int)(Configuration::get('PS_INVOICE')),

Link to comment
Share on other sites

Hi bellini13, thank you so much for trying to help!

 

I’m using a custom theme and version 1.4.8.2. Yes, the order state I created has an invoice associated (I can see it from control panel) and the order is associated to the invoice.

 

But now the situation is even stranger because also when modifying order status to a standard one (payment accepted – which is also defined to generate an invoice and show it to the customer) the behavior is the same: creates the invoice, but do not show it to customer on “My Account” page.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...