Post by Passko » Wed Feb 01, 2023 1:04 am

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.

Attachments

Capture.JPG

Capture.JPG (73.67 KiB) Viewed 1154 times

Capture2.JPG

Capture2.JPG (57.28 KiB) Viewed 1154 times

Last edited by Passko on Sun Feb 05, 2023 12:10 am, edited 1 time in total.

Newbie

Posts

Joined
Thu Jan 15, 2015 7:47 pm

Post by paulfeakins » Wed Feb 01, 2023 10:50 pm

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

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by TMD Extension @ » 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

Image

Thanks & Regards
Sehaj Kaur
TMD Extensions
Contact Us For Customisations


Active Member

Posts

Joined
Thu Mar 17, 2022 12:59 pm

Post by Passko » Sun Feb 05, 2023 12:09 am

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!

Newbie

Posts

Joined
Thu Jan 15, 2015 7:47 pm
Who is online

Users browsing this forum: No registered users and 177 guests