Page 1 of 1

[SOLVED] Admin - Link from one page to another in specific tab

Posted: Wed Feb 01, 2023 1:04 am
by Passko
Hi,

I am using Opencart 3.0.3.8 default theme.

I would like to edit the link in Customer Details section in admin->sale->orders->order_info page.

By default this link opens admin->customers->customer_edit page General tab.

I want, if it's possible, this link to open directly History tab.

How can I achieve this without changing the default active tab from general to history.

I suppose that a little javascript can make this happens, but I can not do it by myself.

Any help is appreciated.


I attach two screenshots in order to be more descriptive of what I want to achieve.

Re: Admin - Link from one page to another in specific tab

Posted: Wed Feb 01, 2023 10:50 pm
by paulfeakins
Passko wrote:
Wed Feb 01, 2023 1:04 am
I want, if it's possible, this link to open directly History tab.
Why?

Re: Admin - Link from one page to another in specific tab

Posted: Thu Feb 02, 2023 6:05 pm
by TMD Extension @
document.addEventListener("load", function(){
document.getElementsByClassName('nav-tabs')[0].children[1].firstElementChild.click()
});

Add this code history tab will select automatically
and code will run after the page will be loaded

RE: Admin - Link from one page to another in specific tab

Posted: Sun Feb 05, 2023 12:09 am
by Passko
TMD Extension @ wrote:
Thu Feb 02, 2023 6:05 pm
document.addEventListener("load", function(){
document.getElementsByClassName('nav-tabs')[0].children[1].firstElementChild.click()
});

Add this code history tab will select automatically
and code will run after the page will be loaded
Thanks a lot, that solved it!