Page titles (for order copy) in admin

Hi,
When a customer wants to print an order copy through the front-end of the store, it will get a page with a pagetitle that has the order number (in the <title> tags in the header). However, when you do it through the admin-area, it gets overridden by something else and will only display the store name in the title.

Is this something that's being overridden on purpose or can it be adjusted? And if it can be adjusted, where should I look? I believe, by looking at the code, it should just be the same as at the front-end, or am I mistaken?

tim

My first question is, why are you printing the header with title url etc?

There is a javascript that injects the h1 for head title. Its going for removal in a future version.

Oh, I didn't make myself entirely clear, sorry.

I meant to 'print to PDF', and then the default/suggested filename will be the pagetitle that's in the title tags.

Is it a part of javascript that can safely be turned off?

tim

Is this a question for the PDF invoice add-on?

No, this is something for the PHP order copy. 

I'm currently wrapping up something based on the order copy that will generate an invoice with proper headers/footers without overlapping areas, but to save something as PDF, it would be beneficial if it would have a logical title :)

tim

I understand perfection is key. Use this to set a logical title:


  document.title = 'My new title';
</script>```

Thanks! 
Now I only have to figure out how to combine that with PHP so that I can fetch the order ID  and use that as a title :)

tim
  document.title = 'Order <?php echo $order['id']; ?>';
</script>

I thought I had tried that but I must've made a typo or so, and then got confused. This works perfectly, thanks for the swift response!

I'll send you a 'cleaned' or more or less 'defaulted' file for this invoice type later on once it's further perfected. Maybe you could/want to use it :) What I have now is something that displays the header and footer on each page of the invoice. Looks pretty sweet. There's a few more things I want/need to adjust and add, but once that's done I'll send it over for you to check out :)

Ezt a témát a hosszú inaktivitás miatt bezártuk. A hozzászólás nem lehetséges.
View code on GitHub