Post by antstyl » Thu Jul 25, 2019 3:28 pm

Good evening on forum ..

In the opencart version 3.0.2.0 when you go Sales -> Orders, select an order and click on the top right button to print the invoice, then invoice opens in the same window.
In versions 1.5 it opened in a new tab, is there a way to change it?

I've seen in admin / view / template / sale / order_list.twig that there is this:

Code: Select all

<button type="submit" id="button-invoice" form="form-order" formaction="{{ invoice }}" formtarget="_blank" data-toggle="tooltip" title="{{ button_invoice_print }}" class="btn btn-info"><i class="fa fa-print"></i></button> </ i>
and while I see that it has formtarget = "_ blank" does not open in a new tab.
Does anyone have any idea?
Last edited by antstyl on Thu Jul 25, 2019 7:10 pm, edited 1 time in total.

User avatar
Active Member

Posts

Joined
Mon Nov 12, 2012 5:40 pm

Post by letxobnav » Thu Jul 25, 2019 5:41 pm

same version, opens in a new tab here.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by paulfeakins » Thu Jul 25, 2019 6:15 pm

antstyl wrote:
Thu Jul 25, 2019 3:28 pm
In the opencart version 3.0.2.0 when you go Sales -> Orders, select an order and click on the top right button to print the invoice, then invoice opens in the same window.
In versions 1.5 it opened in a new tab, is there a way to change it?
Have you tried middle-clicking it? Or right-click then open in new tab?

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Guru Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by antstyl » Thu Jul 25, 2019 6:21 pm

On chrome, even on opencart's demo same thing is happening! Same also with edge browser.

If i enable popups in chrome settings for this site, then a popup opens but at the same time the sales page goes also to the invoice page. So I have two invoice pages!

Middle click is changing the mouse to another option to scroll, and right click gives no option to open in new tab!

User avatar
Active Member

Posts

Joined
Mon Nov 12, 2012 5:40 pm

Post by letxobnav » Thu Jul 25, 2019 6:42 pm

oh, hold on, invoice via the list opens in the same tab, invoice via order detail opens in a new tab here.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by antstyl » Thu Jul 25, 2019 6:47 pm

Sorry for not mentiong it. I mean invoice via orders list with all orders. Then the invoice opens in the same tab, if I am inside the order then invoice opens in new tab as it should.
But according to the code posted above that shouldn't be the case!

User avatar
Active Member

Posts

Joined
Mon Nov 12, 2012 5:40 pm

Post by letxobnav » Thu Jul 25, 2019 6:50 pm

put target="_blank" in the form tag:

<form method="post" action="" enctype="multipart/form-data" target="_blank" id="form-order">

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by antstyl » Thu Jul 25, 2019 7:09 pm

thank you so much for your reply!!

I searched everything in the internet and I was sure that

Code: Select all

formtarget="_blank"
was enough but it wans't

Solved.

User avatar
Active Member

Posts

Joined
Mon Nov 12, 2012 5:40 pm

Post by letxobnav » Thu Jul 25, 2019 7:13 pm

well, formtarget parameter is supposed to override the target parameter in the form tag, I guess it doesn't always do that.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

User avatar
Active Member

Posts

Joined
Sun May 11, 2014 2:04 pm
Who is online

Users browsing this forum: No registered users and 33 guests